Re: need help on VHDL error
None of the designs can be implemented in a 16V8 (apart from obvious VHDL syntax errors in the first one) because it requires too much
register cells. A 16V8 has only
eight registers.
Regarding the first example, if you get a syntax error, you simply have to check your VHDL syntax thoroughly. In this case, you should review the required syntax for VHDL "IF" constructs. Apparently, you didn't yet notice the difference betweeen
ELSIF and
ELSE IF.
But correcting the first example's syntax only reveals the resource problem. Very simple, the shift register implemented by the expression
Code:
tmp1 <= tmp1(6 downto 0)& SI;
already consumes all available 16V8 product terms and registers. You can read the shift register data at the outputs, but you can't further
decode the data in the same device. You most likely need to use a more complex PLD.
As a general remark. It's fine to have VHDL design compilers available for CPLD synthesis. But you possibly miss the direct view on
the underlying logic hardware present with a low level tool like PALASM. It may be helpful to sketch the intended logic function by
product terms and registers before writing HDL.