Prime Detector
Design a combinational circuit block using AND, OR, and NOT gates to check if the 4-bit binary input number is a prime number( )(i.e. one of 2,3,5,7,11,13). The number is to be inputted through the four on-board slide switches (S4-S1) with MSB bit on S4. Output bit represented by Out If the input 4-bit number is:
- a prime number, turn LED8 ON [Out = 1].
- not a prime number, turn LED8 OFF [Out = 0].
note
Please make use of Gates.vhdl file i.e. instantiate components defined in Gates.vhdl rather than using dataflow statements
- Describe the logic circuit in VHDL and construct a trace-file (code not expected) which tries all 16 input combinations.
- Simulate ( RTL and Gate-Level ) the circuit with the generic test-bench and confirm that your circuit
functions correctly.
The format for tracefile should be:
a3 a2 a1 a0 < space > Out < space > mask−bits
- Map your logic circuit to the Krypton board.
- Confirm that the post-synthesis gate level netlist functions correctly.
- Program the Krypton board and make sure that your implementation works correctly.
- Verify you design on Krypton using scanchain