-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hello,
I'm currently researching on CBS and my computations on the CBS parameters differed from the script provided in this project.
I had a look into it and found a potential bug in lines 28-29:
tsn-doc/misc/calc-cbs-params.py
Lines 28 to 29 in 722928b
| hicredit = math.ceil(idleslope_a * frame_non_sr / link_speed) | |
| locredit = math.ceil(sendslope_a * max_frame_size_a / link_speed) |
The variables idleslope_a, sendslope_a and linkspeed are measured in kbit/s
tsn-doc/misc/calc-cbs-params.py
Line 85 in 722928b
| idleslope += int(stream['rate']) * frame_size * 8 / 1000 |
tsn-doc/misc/calc-cbs-params.py
Lines 137 to 138 in 722928b
| parser.add_argument('-S', dest='link_speed', default=1000000, type=int, | |
| help='Link speed in kbps') |
tsn-doc/misc/calc-cbs-params.py
Line 150 in 722928b
| sendslope_a = idleslope_a - args.link_speed |
while max_frame_size_a and frame_non_sr are in Byte (if I did not miss anything).
The usage of kbit/s and byte in one equation sounds wrong to me. Also Annex L section L.2 a) shows an example, where all computations are done in bit and bit/s.
If I missed a point somewhere in the code or the specification, I'd be thankful for pointing it out.
Thanks!