On Wednesday, November 4, 2020 at 8:58:36 PM UTC-5, Jim Lewis wrote:
> Case? does not allow the targets to overlap. To fully access correctness or not
> with your code would require the rest of the code.
Thanks for your reply. Yeah, the code is gone so I could get something to work. There was no overlapping. The "commands" are essentially priority encoded or whatever you want to call it as each command is defined by the first '1' from the left. So commands are "00000001", "0000001-", "000001--", etc. No overlapping. I ended up reworking it as IF command(7) = '1'... ELSIF command(6) = '1'... ELSIF command(5) = '1'... ect.
The case? would have been less typing, maybe, but certainly more clear I think. 6 vs. half dozen I guess. Actually, I'm just disappointed that there are still bugs in VHDL-2008 features after 12 friggin years!
> > # KERNEL: Fatal Error: Don't care ('-') value in the matching select/case statement expression.
> This seems to imply that during simulation, the "Command" input has a'-' in it, which is an
> error in your code.
>
> From 1076-2008:
> "For a matching case statement in which the expression is of type STD_ULOGIC, or an array type whose
> element type is STD_ULOGIC, it is an error if the value of the expression is the scalar value '–' or an array
> value containing '–' as an element."
No, the input expression has no '-' in it. That value comes from some logic driven by a state machine. Possibly a 'X' or 'U' would appear at time 0, but not much chance of a '-' being generated from synthesizable logic. The CASE? is in the test bench code that is checking the commands that are sent by the synthesized logic.
> Verilog does not have this sort of a check by the language and it is a disaster for them.
>
> Run your simulation, single step and observe the value of Command that makes it stop.
> That will help you confirm this.
I think this error is showing up at time 0, not sure. Actually, probably not. I think there is a wait for a falling edge, so not time zero I guess. The process would be run, but not this code. I should generate a test case, but I tried reporting another error to Aldec and got the "talk to your FPGA vendor, it's their code now" stiff arm and Lattice was polite but has not responded following the initial contact.
Bottom line is not much point in preparing a test case if they don't want to hear about it.
When they talk about "expression is of type STD_ULOGIC" I assume they include any closely related types like std_logic and arrays of same like unsigned? VHDL has so many rules it is hard to remember all the rules and terms and just everything. Maybe I need to retire to Florida.
--
Rick C.
-- Get 1,000 miles of free Supercharging
-- Tesla referral code -
https://ts.la/richard11209