Fixed address lines of Basic ROM

This commit is contained in:
Niels Moseley
2018-01-28 20:18:56 +01:00
parent 1cea5d878f
commit fe05766894
4 changed files with 10 additions and 3 deletions

View File

@@ -361,6 +361,7 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to UART_CTS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to UART_RXD set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to UART_RXD
set_global_assignment -name ENABLE_SIGNALTAP ON set_global_assignment -name ENABLE_SIGNALTAP ON
set_global_assignment -name USE_SIGNALTAP_FILE output_files/stp1.stp set_global_assignment -name USE_SIGNALTAP_FILE output_files/stp1.stp
set_global_assignment -name VERILOG_FILE ../../rtl/rom_basic.v
set_global_assignment -name VERILOG_FILE ../../rtl/ps2keyboard/ps2keyboard.v set_global_assignment -name VERILOG_FILE ../../rtl/ps2keyboard/ps2keyboard.v
set_global_assignment -name VERILOG_FILE ../../rtl/boards/terasic_de0/segmentdisplay.v set_global_assignment -name VERILOG_FILE ../../rtl/boards/terasic_de0/segmentdisplay.v
set_global_assignment -name VERILOG_FILE ../../rtl/cpu/arlet/cpu.v set_global_assignment -name VERILOG_FILE ../../rtl/cpu/arlet/cpu.v

View File

@@ -134,7 +134,7 @@ module apple1(
wire [7:0] basic_dout; wire [7:0] basic_dout;
rom_basic #(BASIC_FILENAME) my_rom_basic ( rom_basic #(BASIC_FILENAME) my_rom_basic (
.clk(clk25), .clk(clk25),
.address(ab[7:0]), .address(ab[11:0]),
.dout(basic_dout) .dout(basic_dout)
); );

View File

@@ -1,12 +1,12 @@
module rom_basic( module rom_basic(
input clk, input clk,
input [7:0] address, input [11:0] address,
output reg [7:0] dout output reg [7:0] dout
); );
parameter ROM_FILENAME = "../roms/basic.hex"; parameter ROM_FILENAME = "../roms/basic.hex";
reg [7:0] rom[0:4095]; reg [11:0] rom[0:4095];
initial initial
$readmemh(ROM_FILENAME, rom, 0, 4095); $readmemh(ROM_FILENAME, rom, 0, 4095);

View File

@@ -115,6 +115,12 @@ module uart(
// This causes the UART to ignore the very first byte sent. // This causes the UART to ignore the very first byte sent.
if (~uart_tx_status && uart_tx_init) if (~uart_tx_status && uart_tx_init)
begin begin
`ifdef SIM
if ((din & 8'h7f) >= 32)
$write("%c", din & 8'h7f);
`endif
uart_tx_byte <= {1'b0, din[6:0]}; uart_tx_byte <= {1'b0, din[6:0]};
uart_tx_stb <= 1; uart_tx_stb <= 1;
end end