Fixed a bunch of things wrong with fpga_top.v and gated off some more simulation-only code
This commit is contained in:
parent
08aac5c7b6
commit
934e2f5a36
@ -23,35 +23,38 @@ module fpga_top(
|
||||
input clk48,
|
||||
|
||||
input user_button,
|
||||
output reset_n,
|
||||
// output reset_n,
|
||||
|
||||
output reg rgb_led0_r,
|
||||
output reg rgb_led0_g,
|
||||
output reg rgb_led0_b,
|
||||
output rgb_led0_r,
|
||||
output rgb_led0_g,
|
||||
output rgb_led0_b,
|
||||
);
|
||||
|
||||
wire HALT;
|
||||
wire [`ERROR_BITS-1:0]ERROR;
|
||||
wire [19:0] address_bus;
|
||||
wire [15:0] data_bus_read,data_bus_write;
|
||||
wire rd,wr,BHE,IOMEM;
|
||||
system system(
|
||||
/* MISC */ clk48,user_button,HALT,ERROR
|
||||
/* MEMORY / IO */ ,address_bus,data_bus,rd,wr,BHE,IOMEM
|
||||
/* MISC */ clk48,user_button
|
||||
/* MEMORY / IO */ ,address_bus,data_bus_read,data_bus_write,BHE,rd,wr,IOMEM,HALT,ERROR
|
||||
);
|
||||
|
||||
reg [2:0]rgb_led_color;
|
||||
assign rgb_led0_r=rgb_led_color[0];
|
||||
assign rgb_led0_g=rgb_led_color[1];
|
||||
assign rgb_led0_b=rgb_led_color[2];
|
||||
|
||||
always @(HALT or ERROR or user_button) begin
|
||||
if (HALT==0) begin
|
||||
/* yellow */
|
||||
rgb_led_r=0;
|
||||
rgb_led_g=0;
|
||||
rgb_led_b=1;
|
||||
rgb_led_color<=3'b100;
|
||||
end else if (ERROR != `ERROR_BITS'b0) begin
|
||||
/* red */
|
||||
rgb_led_r=0;
|
||||
rgb_led_g=1;
|
||||
rgb_led_b=1;
|
||||
rgb_led_color<=3'b110;
|
||||
end else begin
|
||||
rgb_led_r=1;
|
||||
rgb_led_g=0;
|
||||
rgb_led_b=1;
|
||||
/* green */
|
||||
rgb_led_color<=3'b101;
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -61,7 +61,7 @@ string waveform_name;
|
||||
`endif
|
||||
|
||||
initial begin
|
||||
`ifndef YOSYS
|
||||
`ifndef SYNTHESIS
|
||||
if($value$plusargs("WAVEFORM=%s",waveform_name))begin
|
||||
$dumpfile(waveform_name);
|
||||
$dumpvars(0,p,cycles);
|
||||
@ -76,9 +76,9 @@ initial begin
|
||||
end else
|
||||
json_file_descriptor=0;
|
||||
`endif
|
||||
`endif
|
||||
sane=0;
|
||||
finish=0;
|
||||
`endif
|
||||
end
|
||||
|
||||
//integer killswitch=0;
|
||||
@ -193,9 +193,6 @@ reg [128:0] instruction_count_temp;
|
||||
finish<=2'd1;
|
||||
end
|
||||
end
|
||||
`endif
|
||||
|
||||
|
||||
|
||||
always @(negedge clock)begin
|
||||
if(reset==1)
|
||||
@ -207,6 +204,8 @@ always @(negedge clock)begin
|
||||
`endif
|
||||
end
|
||||
end
|
||||
`endif
|
||||
|
||||
|
||||
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user