|
|
|
|
|
|
|
|
`include "../spi_interface.v" |
|
|
`include "../spi_interface.v" |
|
|
`include "../fsm/Fsm.sv" |
|
|
`include "../fsm/Fsm.sv" |
|
|
`include "../Bus_if/Bus_if.sv" |
|
|
`include "../Bus_if/Bus_if.sv" |
|
|
|
|
|
`include "../timer_port/timer_top.sv" |
|
|
|
|
|
|
|
|
module Top( |
|
|
module Top( |
|
|
input wire clk |
|
|
|
|
|
|
|
|
input wire clk, |
|
|
|
|
|
input wire rst, |
|
|
|
|
|
input wire endOfConv, |
|
|
|
|
|
output wire LEDg, |
|
|
|
|
|
output wire LEDr, |
|
|
|
|
|
output wire AlarmAmpel |
|
|
); |
|
|
); |
|
|
// Bus (Interface) |
|
|
// Bus (Interface) |
|
|
Bus_if bus(.clk(clk)); |
|
|
Bus_if bus(.clk(clk)); |
|
|
// SPI Interface |
|
|
// SPI Interface |
|
|
|
|
|
|
|
|
// FSM |
|
|
// FSM |
|
|
Fsm fsm( |
|
|
Fsm fsm( |
|
|
.clk(clk), |
|
|
.clk(clk), |
|
|
|
|
|
|
|
|
.outTimerEN(bus.TimerEN) |
|
|
.outTimerEN(bus.TimerEN) |
|
|
); |
|
|
); |
|
|
// Parallelport |
|
|
// Parallelport |
|
|
|
|
|
parallelport parallelport1 ( |
|
|
|
|
|
.inClk(clk), |
|
|
|
|
|
.inTimerMeas(bus.TimerMeas), |
|
|
|
|
|
.inEndOfConv(endOfConv), |
|
|
|
|
|
.inData(bus.Data), |
|
|
|
|
|
.outDataValid(bus.DataValid), |
|
|
|
|
|
.outData(bus.Data) |
|
|
|
|
|
); |
|
|
// FRAM-Controller |
|
|
// FRAM-Controller |
|
|
// Timer |
|
|
// Timer |
|
|
|
|
|
timer timer1 ( |
|
|
|
|
|
.inClk(clk), |
|
|
|
|
|
.inTaste(bus.Taste), |
|
|
|
|
|
.inEN(bus.TimerEN), |
|
|
|
|
|
.outReadTemp(bus.ReadTemp), |
|
|
|
|
|
.outTasteAktiv(bus.TasteAktiv) |
|
|
|
|
|
); |
|
|
// Ampelsteuerung |
|
|
// Ampelsteuerung |
|
|
|
|
|
led_top ampelsteuerung ( |
|
|
|
|
|
.clk12M(clk), |
|
|
|
|
|
.rst(rst), |
|
|
|
|
|
.data_input(bus.Data), |
|
|
|
|
|
.data_valid(bus.DataValid), |
|
|
|
|
|
.RED(LEDr), |
|
|
|
|
|
.GRN(LEDg), |
|
|
|
|
|
.alarm(bus.AlarmAmpel) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
assign AlarmAmpel = bus.AlarmAmpel; |
|
|
|
|
|
|
|
|
endmodule |
|
|
endmodule |