Hi,ultimately synthesis) of internal logic, I see no particular benefit - on the contrary, I can imagine that it might be beneficial to restrict the number of possible states as much as possible and in fact, elsewhere designers are encouraged to always use (
I have found a coding guideline that recommends to use std_logic everywhere in preference to bit, on the basis that it can represent more states (X, Z, etc.).
What I found surprising is the implicit assumption that more states is an added value. I understand that on the module boundary the additional states can be useful, as they can model (or even enable) wider interfacing options. But for modeling (and
case my_std_logic_value is
when '0' => ...
when '1' => ...
when others =>
assert false;
end case;
obviously miss the point.
So I find such guidelines contradicting each other. What is your opinion on this? Are there other aspects worth discussing? Do you feel bad using bit(_vector) for modeling internal logic?
--
Maciej Sobczak * http://www.inspirel.com
Hi,ultimately synthesis) of internal logic, I see no particular benefit - on the contrary, I can imagine that it might be beneficial to restrict the number of possible states as much as possible and in fact, elsewhere designers are encouraged to always use (
I have found a coding guideline that recommends to use std_logic everywhere in preference to bit, on the basis that it can represent more states (X, Z, etc.).
What I found surprising is the implicit assumption that more states is an added value. I understand that on the module boundary the additional states can be useful, as they can model (or even enable) wider interfacing options. But for modeling (and
case my_std_logic_value is
when '0' => ...
when '1' => ...
when others =>
assert false;
end case;
obviously miss the point.
So I find such guidelines contradicting each other. What is your opinion on this? Are there other aspects worth discussing? Do you feel bad using bit(_vector) for modeling internal logic?
What I found surprising is the implicit assumption that more states is an added value.
Am Montag, 7. Oktober 2019 09:07:18 UTC+2 schrieb Maciej Sobczak:technology dependency is needed for performance reasons) as some might request you to incorporate 10 year old fpga code in a mixed signal ASIC as IP.
What I found surprising is the implicit assumption that more states is an added value.
Std_logic vs bit costs simulation performance but provides an universal and known good debug tool that bit will never provide.
First keep in mind that real world VHDL code needs to be portable as much as possible from design to design (reuse). This will always mean that the code needs to be portable from tool to tool as good as possible (Every designer knows the limits when
In large projects it is quite common to detect problems with unitialised registers which might not even be detectable in an Xilinx-FPGA on equipment level as this FF is initialised to low after power up, when moving same design to ASIC you learn thatthere is no guarantee that FF is low after Power-Up.
std_(u)logic helps detecting this in first simulations. Same for correct behavior of (intended or undesired) tristate.
And what benefit is gained, when you need to convert anywhere between bit internal and std_(u)logic as your internal signal might be tomorrow external input or output.
Therefore it is far easier to encurage to use std_logic anywhere instead of wasting time for checking on every signal what type is more benefitial.
Same for integer. It is easier to use always (un)signed instead of integer/natural instead of double checking if integer is really useable or not.
Thank you all for your answers, they were very instructive. The general theme is that std_logic prevents hiding some of the issues that otherwise might get lost when narrower bit is used.
Hi,ultimately synthesis) of internal logic, I see no particular benefit - on the contrary, I can imagine that it might be beneficial to restrict the number of possible states as much as possible and in fact, elsewhere designers are encouraged to always use (
I have found a coding guideline that recommends to use std_logic everywhere in preference to bit, on the basis that it can represent more states (X, Z, etc.).
What I found surprising is the implicit assumption that more states is an added value. I understand that on the module boundary the additional states can be useful, as they can model (or even enable) wider interfacing options. But for modeling (and
case my_std_logic_value is
when '0' => ...
when '1' => ...
when others =>
assert false;
end case;
obviously miss the point.
So I find such guidelines contradicting each other. What is your opinion on this? Are there other aspects worth discussing? Do you feel bad using bit(_vector) for modeling internal logic?
--
Maciej Sobczak * http://www.inspirel.com
Hi,ultimately synthesis) of internal logic, I see no particular benefit - on the contrary, I can imagine that it might be beneficial to restrict the number of possible states as much as possible and in fact, elsewhere designers are encouraged to always use (
I have found a coding guideline that recommends to use std_logic everywhere in preference to bit, on the basis that it can represent more states (X, Z, etc.).
What I found surprising is the implicit assumption that more states is an added value. I understand that on the module boundary the additional states can be useful, as they can model (or even enable) wider interfacing options. But for modeling (and
case my_std_logic_value is
when '0' => ...
when '1' => ...
when others =>
assert false;
end case;
obviously miss the point.
So I find such guidelines contradicting each other. What is your opinion on this? Are there other aspects worth discussing? Do you feel bad using bit(_vector) for modeling internal logic?
--
Maciej Sobczak * http://www.inspirel.com
Hi,ultimately synthesis) of internal logic, I see no particular benefit - on the contrary, I can imagine that it might be beneficial to restrict the number of possible states as much as possible and in fact, elsewhere designers are encouraged to always use (
I have found a coding guideline that recommends to use std_logic everywhere in preference to bit, on the basis that it can represent more states (X, Z, etc.).
What I found surprising is the implicit assumption that more states is an added value. I understand that on the module boundary the additional states can be useful, as they can model (or even enable) wider interfacing options. But for modeling (and
case my_std_logic_value is
when '0' => ...
when '1' => ...
when others =>
assert false;
end case;
obviously miss the point.
So I find such guidelines contradicting each other. What is your opinion on this? Are there other aspects worth discussing? Do you feel bad using bit(_vector) for modeling internal logic?
--
Maciej Sobczak * http://www.inspirel.com
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 01:22:58 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,325,421 |