Readback of a signal with length 0 (VHDL2008)
See original GitHub issueWhen I read back a signal of length 0, the conversion fails. I attached a minimal example. If the cntrlwidth is set to >0 it works. Signals with length 0 can for example be assigned to unused signals in buses. I expected the conversion to return 0.
Traceback (most recent call last):
# File "binaryvalue_bug/binaryvaluetest.py", line 49, in test_cntrl
# assert dut.Cntrl_in.value.integer == dut.Cntrl_out.value.integer
# File "cocotb/cocotb/binary.py", line 294, in integer
# return self._convert_from[self.binaryRepresentation](self._str)
# File "cocotb/cocotb/binary.py", line 200, in _convert_from_unsigned
# return int(resolve(x), 2)
# ValueError: invalid literal for int() with base 2: ''
Running on ModelSim DE version 2020.4 2020.10 (32bit) Running tests with cocotb v1.5.0.dev0 OS: CentOS 64bit
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
VHDL-2008, The End of Verbosity! - SynthWorks
VHDL-2008 allows the use of keyword "all" in place of signals. SynthWorks ... Lengths. Unsigned notation (default). Extend: 0 fill LHS.
Read more >Why do we assign our outputs to signals first in VHDL?
I will tell you a scenario. Suppose you are creating an entity with. 2 input ports : A,B. 2 output ports : C,D....
Read more >reg_file — VHDL-extras 1.0 documentation - GitHub Pages
The VHDL-2008 version uses unconstrained arrays-of-arrays for the Registers and Direct_read signals. This permits you to use any word size without needing ...
Read more >Designing with VHDL
231-1) with predefined subtypes natural (≥0) and positive (>0) signal counter : Integer; signal timer : Natural;. • boolean has two possible values...
Read more >VHDL 2008 calculate length of vector without leading zeros
For clarification: If the inputvector looks like "000100111", the output vector should also be (4 downto 0). That's why i just can't use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well as long as it’s consistent I guess I’m okay with it too. @Botnic @alexforencich Could one of you make the changes with a test for this case?
How would you even write a null array with cocotb? Array writing is filled through python iteration, isn’t it?