Browse Source

Added SPI interface to top level design

main
sessleral71711 2 years ago
parent
commit
15b48049ab
1 changed files with 15 additions and 3 deletions
  1. 15
    3
      Top/Top.sv

+ 15
- 3
Top/Top.sv View File

`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" `include "../timer_port/timer_top.sv"
`include "../spi_interface_radiant/spi_interface.sv"


module Top( module Top(
input wire clk, input wire clk,
input wire endOfConv, input wire endOfConv,
output wire LEDg, output wire LEDg,
output wire LEDr, output wire LEDr,
output wire AlarmAmpel
output wire AlarmAmpel,
output wire Alarm_R
); );
// Bus (Interface) // Bus (Interface)
Bus_if bus(.clk(clk)); Bus_if bus(.clk(clk));
// SPI Interface // SPI Interface
spi_interface_ports spi_bus(.clk(clk));

// FSM // FSM
Fsm fsm( Fsm fsm(
.clk(clk), .clk(clk),
.alarm(bus.AlarmAmpel) .alarm(bus.AlarmAmpel)
); );


assign AlarmAmpel = bus.AlarmAmpel;
assign AlarmAmpel = bus.AlarmAmpel;
assign Alarm_R = bus.Alarm_R;

assign bus.sbclk = spi_bus.sb_clk_i;
assign bus.sbstb = spi_bus.sb_stb_i;
assign bus.sbrw = spi_bus.sb_wr_i;
assign bus.sbadr = spi_bus.sb_adr_i;
assign bus.sbdat_r = spi_bus.sb_dat_i;
assign bus.sbdat_w = spi_bus.sb_dat_o;
assign bus.sback = spi_bus.sb_ack_o;
endmodule endmodule

Loading…
Cancel
Save