Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we use std_logic or std_ulogic? #13

Open
Paebbels opened this issue Jul 4, 2020 · 4 comments
Open

Should we use std_logic or std_ulogic? #13

Paebbels opened this issue Jul 4, 2020 · 4 comments
Labels
Discussion Enhancement New feature or request

Comments

@Paebbels
Copy link
Member

Paebbels commented Jul 4, 2020

While PCB signals in an I²C interface need resolution capabilities, type std_logic is fixed. But what about fabric internal signals. Here is no multiple-source behavior / driving value resolution needed. Moreover, std_ulogic could prevent lots of coding errors.

Earlier revisions of the VHDL language had problem, because std_logic_vector and std_ulogic_vector where not compatible. This was changed in VHDL-2008.

I propose to skip the std_logic only rule and propose:

  • Use std_ulogic and std_ulogic_vector for fabric internal interfaces
  • Limit usage of std_logic and std_logic_vector to external interfaces (PCB level) where multiple driven wires are needed.
  • Use unresolved_unsigned for address buses.
    Note: unsigned has also an unresolved variant.

/cc @JimLewis, @LarsAsplund

@Paebbels Paebbels added Discussion Enhancement New feature or request labels Jul 4, 2020
@Paebbels Paebbels mentioned this issue Jul 5, 2020
Closed
3 tasks
@Paebbels Paebbels added this to the Prepare first release milestone Jul 5, 2020
@JimLewis
Copy link

JimLewis commented Jul 5, 2020

Agree

@LarsAsplund
Copy link

I've never really worked with std_ulogic because of old habits and compatibility issues. It should be the better option so why not.

@Paebbels
Copy link
Member Author

@LarsAsplund I think compatibility issues have been solved since years, but no one tried if it works now :).

@NJDFan
Copy link

NJDFan commented Jul 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants