Day2_SV_Assignment_for_next_day
Day2_SV_Assignment_for_next_day
RED N1 ticks
N3 ticks
YELLOW GREEN
N2 ticks
o Three states (RED, GREEN, YELLOW) defined as enum data types in a separate package
o Create a state machine with initial state as RED and transition will be according to as
shown in the above diagram.
o Input:
Clock
Parameter structure containing counter values N1, N2 & N3
o Output:
A signal representing state change
A 2 bit signal containing value of state as below:
2’b00 if state == RED
2’b01 if state == GREEN
2’b10 if state == YELLOW
2’bxx if state == UNDEFINED
Circular FIFO
Design a circular FIFO model with the following specifications:
o Write Data (Width & type parameterized)
o Read Data (Width & type parameterized)
o Clock & reset (1 bit signal each)
o Write & read enable (1 bit signal each)
o Structure containing status flags (internal variables)
Empty flag (high when FIFO is empty else low)
Over-write flag (high if overwrite else low)
Above FIFO model should be synthesizable (Look for info message in Precision run transcript
for inferred RAMs etc.). Also, verify its complete functionality using simulator by creating a test
bench. Probe the status registers also to check the intended behavior.
Design Functionality:
Write: Writing mechanism is non-blocked. If FIFO is rolled over, it will write to the
previous written location and will set the overwrite flag high.
Read: Read the oldest data in FIFO.