Question: the codes work and everything but i don't know how to but it on the Basys 3 board with . xdc file spacilly the seven
the codes work and everything but i don't know how to but it on the Basys board with xdc file spacilly the seven segment display for all four.
timescale ns ps
module Top
input clk
input btnmode,
input btn Declare button inputs
input btn
input btn
input btn
input : alua
input : alub
output : sega segb segc segd
output : result,
output divbyzero
;
Wires for FSM outputs
wire : opcode;
wire mode;
wire aluenable;
Wires for ALU results
wire : digit digit digit digit;
Convert the four buttons btn btn btn btn to bit btnsel
wire : btnsel;
Define the logic for btnsel based on the button presses
assign btnsel btn btn; Concatenate btn and btn for a bit selection
Instantiate the FSM module
calculatorfsm fsm
clkclk
btnmodebtnmode
btnbtn Pass button states
btnbtn
btnbtn
btnbtn
opcodeopcode
modemode
aluenablealuenable
;
Instantiate the ALU
alu aluunit
aalua
balub
opcodeopcode
enablealuenable
resultresult
divbyzerodivbyzero
;
Instantiate binary to BCD conversion
binarytobcd bcd
binaryresult
digitdigit
digitdigit
digitdigit
digitdigit
;
Instantiate SevenSegmentTruthTable for ones place
SevenSegmentTruthTable seg
xdigit
xdigit
xdigit
xdigit
asega
bsega
csega
dsega
esega
fsega
gsega
;
Instantiate SevenSegmentTruthTable for tens place
SevenSegmentTruthTable seg
xdigit
xdigit
xdigit
xdigit
asegb
bsegb
csegb
dsegb
esegb
fsegb
gsegb
;
Instantiate SevenSegmentTruthTable for hundreds place
SevenSegmentTruthTable seg
xdigit
xdigit
xdigit
xdigit
asegc
bsegc
csegc
dsegc
esegc
fsegc
gsegc
;
Instantiate SevenSegmentTruthTable for thousands place
SevenSegmentTruthTable seg
xdigit
xdigit
xdigit
xdigit
asegd
bsegd
csegd
dsegd
esegd
fsegd
gsegd
;
endmodule
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
