Skip to content

Commit

Permalink
FPGA: free some block RAM when using ChipScope
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehkopf committed Jul 5, 2019
1 parent df72413 commit 899c813
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions verilog/sd2snes_cx4/dac.v
Expand Up @@ -18,6 +18,8 @@
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
`include "config.vh"

module dac(
input clkin,
input sysclk,
Expand Down Expand Up @@ -56,6 +58,7 @@ always @(posedge clkin) begin
end

`ifdef MK2
`ifndef DEBUG
dac_buf snes_dac_buf (
.clka(clkin),
.wea(~we), // Bus [0 : 0]
Expand All @@ -65,6 +68,7 @@ dac_buf snes_dac_buf (
.addrb(dac_address), // Bus [8 : 0]
.doutb(dac_data)); // Bus [31 : 0]
`endif
`endif

`ifdef MK3
dac_buf snes_dac_buf (
Expand Down
4 changes: 4 additions & 0 deletions verilog/sd2snes_cx4/msu.v
Expand Up @@ -18,6 +18,8 @@
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
`include "config.vh"

module msu(
input clkin,
input enable,
Expand Down Expand Up @@ -112,6 +114,7 @@ assign status_out = {msu_address_r[13], // 7
initial msu_address_r = 14'h1234;

`ifdef MK2
`ifndef DEBUG
msu_databuf snes_msu_databuf (
.clka(clkin),
.wea(~pgm_we), // Bus [0 : 0]
Expand All @@ -122,6 +125,7 @@ msu_databuf snes_msu_databuf (
.doutb(msu_data)
); // Bus [7 : 0]
`endif
`endif
`ifdef MK3
msu_databuf snes_msu_databuf (
.clock(clkin),
Expand Down
6 changes: 6 additions & 0 deletions verilog/sd2snes_gsu/dac.v
Expand Up @@ -18,6 +18,8 @@
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
`include "config.vh"

module dac(
input clkin,
input sysclk,
Expand Down Expand Up @@ -63,6 +65,7 @@ always @(posedge clkin) begin
sysclk_sreg <= {sysclk_sreg[1:0], sysclk};
end
`ifdef MK2
`ifndef DEBUG
dac_buf snes_dac_buf (
.clka(clkin),
.wea(~we), // Bus [0 : 0]
Expand All @@ -72,6 +75,8 @@ dac_buf snes_dac_buf (
.addrb(dac_address), // Bus [8 : 0]
.doutb(dac_data)); // Bus [31 : 0]
`endif
`endif

`ifdef MK3
dac_buf snes_dac_buf (
.clock(clkin),
Expand All @@ -81,6 +86,7 @@ dac_buf snes_dac_buf (
.rdaddress(dac_address), // Bus [8 : 0]
.q(dac_data)); // Bus [31 : 0]
`endif

reg [10:0] cnt;
reg [15:0] smpcnt;
reg [1:0] samples;
Expand Down

0 comments on commit 899c813

Please sign in to comment.