Browse Source

Added parallelport, timer and ampelsteuerung

top_level_design
sessleral71711 2 years ago
parent
commit
019dc2868e
2 changed files with 39 additions and 4 deletions
  1. 2
    3
      Source_Ampel/rgb_led_top.sv
  2. 37
    1
      Top/Top.sv

+ 2
- 3
Source_Ampel/rgb_led_top.sv View File

input wire rst, input wire rst,
input wire [7:0] data_input, input wire [7:0] data_input,
input wire data_valid, input wire data_valid,
output reg REDn,
output reg GRNn,
output reg RED, output reg RED,
output reg GRN, output reg GRN,
output reg alarm output reg alarm
wire red_pwm; wire red_pwm;
wire grn_pwm; wire grn_pwm;
reg REDn;
reg GRNn;
defparam U1.on_hi = 2'b10; defparam U1.on_hi = 2'b10;
defparam U1.on_lo = 2'b01; defparam U1.on_lo = 2'b01;
defparam U1.off = 2'b00; defparam U1.off = 2'b00;

+ 37
- 1
Top/Top.sv View File

>>>>>>> b8d8341 (Initalized top level design) >>>>>>> b8d8341 (Initalized top level design)
======= =======
`include "../Bus_if/Bus_if.sv" `include "../Bus_if/Bus_if.sv"
<<<<<<< HEAD
>>>>>>> c93bdaf (Added bus_if and fsm to top level design) >>>>>>> c93bdaf (Added bus_if and fsm to top level design)
=======
`include "../timer_port/timer_top.sv"
>>>>>>> 026899b (Added parallelport, timer and ampelsteuerung)


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
<<<<<<< HEAD <<<<<<< HEAD
>>>>>>> b8d8341 (Initalized top level design) >>>>>>> b8d8341 (Initalized top level design)
); );
>>>>>>> c93bdaf (Added bus_if and fsm to top level design) >>>>>>> c93bdaf (Added bus_if and fsm to top level design)
// 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

Loading…
Cancel
Save