bb said:
This is a finite state machine for "tester", it will generate 10
questions, each question is a random value, and then, the user using
push buttons will enter the bcd value. the tester will then, indicate
if its correct or false.
So, in state 1, ST1, I need a random value to be generated. How will I
include the function randomize in this code? And how will it be called
in ST1?
Yes, this code was tested.
That seems unlikely.
See the syntax errors below to start with.
Variables and functions must be declared between
IS and BEGIN of the *PROCESS*.
Consider using clock enables instead of multiple clocks.
The number generator is the least of your problems.
Get the basic controller running with a constant sequence first
Start with a known-good CASE example and simulate that first.
Add features one at a time, and debug each one.
A newsgroup like this will answer specific questions
or make comments and suggestions
once you have some working code, but it
is unreasonable to expect more.
Consider finding a local tutor.
Good luck.
-- Mike Treseler
__________________________
vcom -2002 -quiet -work work tester.vhd
** Error: tester.vhd(35): near ")": expecting: IDENTIFIER
** Error: tester.vhd(83): near "0:": (vcom-111) No digits found in
mantissa part of based literal.
** Error: tester.vhd(83): near "0:": (vcom-113) Mantissa part of based
integer literal terminates with '
'; should be ':'.
** Error: tester.vhd(83): near "0:": (vcom-118) Base value 0 is not in
range 2 to 16.
** Error: tester.vhd(84): near ":=": expecting: ';'
** Error: tester.vhd(90): near "State": expecting: GENERATE THEN
** Error: tester.vhd(104): near "when": expecting: END
** Error: tester.vhd(108): near "when": expecting: END