-
Notifications
You must be signed in to change notification settings - Fork 141
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
Bluespec-emitted Verilog makes Yosys unhappy #118
Comments
Could you give us some bluespec reproducers for these please?
|
I haven't cooked up an example but realistically you can probably feed just about any design to yosys and reproduce these, literally anything. In particular the In my understanding, yes, Synopsys does support standardized Verilog 2001 attributes (for everything it supports attributes for), the comment style is just the pre-standardized holdover. You can find this in various Synplify manuals, etc. So I think it's safe to just use them. I do have patches that (confirmed) fix issues 1 and 2. Perhaps the more pressing issue wrt 2 is that attributes were only added with standard Verilog 2001, but BSV seems to generally target the weaker feature set of Verilog 95. Frankly I think this is probably fine to ignore, for the most part, in the name of minimizing tool-specfic behavior/support. |
BSC has a |
Can we flip that on its head and ask if we have to preserve Verilog 95 support? What if we targeted a subset of Verilog 2001 (and say, kept the More generally, the problem is really that parallel_case and full_case just aren't well specified by Verilog itself, so whether or not any of these even applies is a crap shoot. I mean, I'm not a Verilog master, but it's completely fine if any synthesis tool just flat-out ignored attributes and In general it's all kind of a crapshoot I feel, without doing extremely laborous review of every synthesis tool on earth. "Verilog 95" or "Verilog 2001" support often mean incredibly vague things without digging into it; for instance Vendors (like Intel) say they "only" support VHDL 94 or whatever, even though they do support almost all of the synthesizable subset of newer VHDL standards. They say they "only" support VHDL 94 though, because they don't support all of the simulation constructs (meanwhile vendors like Cadence or whatever support "the entire" VHDL standard, including all simulation constructs, but I'm guessing many of them don't matter). Despite that, strict Verilog 95 is probably only enforced or required by the oldest, creakiest, worst-est of EDA tools at this point. Also: Targeting newer Verilog would also be nice so we could clean up other things; the way the compiler does old-school port rendering is actually a nitpick I have, because I absolutely hate having to look for wire declarations to see if which ports are inputs or outputs (i.e. the difference between |
The Bluespec compiler emits Verilog which makes Yosys somewhat unhappy:
The first warning is triggered by this (
parallel_case
):Fix: use Verilog-standard
(* parallel_case *)
instead:Second (
translate_off
):Fix: add
ifdef YOSYS
to chain and scope properly. This helps scope the translation to simulators.Third (combinatorial block):
Fix: just use
always @*
for combinational blocks, since there aren't any clock edges used in the sensitivity list:The text was updated successfully, but these errors were encountered: