diff --git a/cpld/rtl/top.v b/cpld/rtl/top.v index 2221ceb..949ddd4 100644 --- a/cpld/rtl/top.v +++ b/cpld/rtl/top.v @@ -45,6 +45,8 @@ module zx_multisound( output n_grom, output n_gram1, output n_gram2, + output n_gram3, + output n_gram4, output [18:15] gma, output dac0_out, @@ -193,7 +195,7 @@ end /* GS INTERNAL REGISTERS */ reg [7:0] gs_reg00, gs_reg_out; -wire [5:0] gs_page = gs_reg00[5:0]; +wire [6:0] gs_page = gs_reg00[6:0]; always @(posedge clk32 or negedge rst_n) begin if (!rst_n) begin gs_reg00 <= 0; @@ -255,8 +257,17 @@ end /* GS BUS CONTROLLER */ assign n_grom = (~n_gmreq && ((ga[15:14] == 2'b00) || (ga[15] && gs_page == 0)))? 1'b0 : 1'b1; -assign n_gram1 = (~n_gmreq && n_grom && (~gs_page[4] || ~ga[15]))? 1'b0 : 1'b1; -assign n_gram2 = (~n_gmreq && n_grom && gs_page[4] && ga[15] )? 1'b0 : 1'b1; +`ifdef GS_RAM_2MB + assign n_gram1 = (~n_gmreq && n_grom && ((gs_page[5:4] == 2'd0) || ~ga[15]))? 1'b0 : 1'b1; + assign n_gram2 = (~n_gmreq && n_grom && (gs_page[5:4] == 2'd1) && ga[15] )? 1'b0 : 1'b1; + assign n_gram3 = (~n_gmreq && n_grom && (gs_page[5:4] == 2'd2) && ga[15] )? 1'b0 : 1'b1; + assign n_gram4 = (~n_gmreq && n_grom && (gs_page[5:4] == 2'd3) && ga[15] )? 1'b0 : 1'b1; +`else + assign n_gram1 = (~n_gmreq && n_grom && (~gs_page[4] || ~ga[15]))? 1'b0 : 1'b1; + assign n_gram2 = (~n_gmreq && n_grom && gs_page[4] && ga[15] )? 1'b0 : 1'b1; + assign n_gram3 = 1'b1; + assign n_gram4 = 1'b1; +`endif assign gma = (ga[15] == 1'b0)? 4'b0001 : gs_page[3:0]; assign gd = (~n_giorq && ~n_grd && ga[3:0] == 4'h4)? gs_status : diff --git a/cpld/syn/rev_A.qsf b/cpld/syn/rev_A.qsf index b5ad762..e082849 100644 --- a/cpld/syn/rev_A.qsf +++ b/cpld/syn/rev_A.qsf @@ -103,6 +103,9 @@ set_location_assignment PIN_60 -to dac3_out set_location_assignment PIN_61 -to dac2_out set_location_assignment PIN_62 -to dac1_out set_location_assignment PIN_63 -to dac0_out +set_location_assignment PIN_70 -to n_gram4 +set_location_assignment PIN_71 -to n_gram3 +set_location_assignment PIN_72 -to n_mreq set_location_assignment PIN_74 -to fm1_ena set_location_assignment PIN_75 -to ym_m set_location_assignment PIN_78 -to aa0 @@ -158,7 +161,6 @@ set_location_assignment PIN_140 -to a[8] set_location_assignment PIN_141 -to a[9] set_location_assignment PIN_142 -to a[10] set_location_assignment PIN_143 -to a[11] -set_location_assignment PIN_72 -to n_mreq set_global_assignment -name MAX7000_OPTIMIZATION_TECHNIQUE BALANCED set_global_assignment -name PRE_MAPPING_RESYNTHESIS OFF set_global_assignment -name OPTIMIZE_HOLD_TIMING OFF diff --git a/cpld/syn/rev_A1.qsf b/cpld/syn/rev_A1.qsf index a5de0b6..aa88654 100644 --- a/cpld/syn/rev_A1.qsf +++ b/cpld/syn/rev_A1.qsf @@ -55,6 +55,7 @@ set_global_assignment -name MAX7000_DEVICE_IO_STANDARD "3.3-V LVTTL" set_global_assignment -name SAVE_DISK_SPACE OFF set_global_assignment -name TIMEQUEST_MULTICORNER_ANALYSIS OFF set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS OFF +set_location_assignment PIN_1 -to n_gram4 set_location_assignment PIN_2 -to n_gram2 set_location_assignment PIN_5 -to gma[17] set_location_assignment PIN_6 -to gma[16] @@ -159,6 +160,7 @@ set_location_assignment PIN_139 -to a[8] set_location_assignment PIN_140 -to a[9] set_location_assignment PIN_141 -to a[10] set_location_assignment PIN_142 -to a[11] +set_location_assignment PIN_143 -to n_gram3 set_global_assignment -name MAX7000_OPTIMIZATION_TECHNIQUE BALANCED set_global_assignment -name PRE_MAPPING_RESYNTHESIS OFF set_global_assignment -name OPTIMIZE_HOLD_TIMING OFF