Compare commits
2 commits
2735b80fec
...
e690d3eb2b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e690d3eb2b | ||
|
|
4d4cc0c535 |
3 changed files with 26 additions and 16 deletions
|
|
@ -165,7 +165,7 @@ module dram_bridge #(ADDR_WIDTH = 32, WIDTH = 32)
|
||||||
assign app_wdf_data = { {4{mem_write_data}} };
|
assign app_wdf_data = { {4{mem_write_data}} };
|
||||||
|
|
||||||
assign mem_wait = (dram_read_enable & ~read_inprogress) |
|
assign mem_wait = (dram_read_enable & ~read_inprogress) |
|
||||||
(mem_write_enable & ~dcache_hit & (~app_wdf_rdy | ~app_rdy)) |
|
(mem_write_enable & (~app_wdf_rdy | ~app_rdy)) |
|
||||||
(read_inprogress & ~app_rd_data_valid);
|
(read_inprogress & ~app_rd_data_valid);
|
||||||
|
|
||||||
assign app_en = (dram_read_enable & ~read_inprogress) |
|
assign app_en = (dram_read_enable & ~read_inprogress) |
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
||||||
|
|
||||||
// waveform generator module (only pulse wave for now)
|
// waveform generator module (pulse wave or noise)
|
||||||
module wavegen #(DATA_WIDTH=32, CLOCK_DIV_WIDTH=22, AMP_WIDTH=16) (
|
module wavegen #(DATA_WIDTH=32, CLOCK_DIV_WIDTH=22,
|
||||||
|
AMP_WIDTH=16, AMP_BIAS=32768) (
|
||||||
input wire clk,
|
input wire clk,
|
||||||
input wire reset,
|
input wire reset,
|
||||||
input wire [1:0] reg_sel,
|
input wire [1:0] reg_sel,
|
||||||
|
|
@ -18,11 +19,6 @@ module wavegen #(DATA_WIDTH=32, CLOCK_DIV_WIDTH=22, AMP_WIDTH=16) (
|
||||||
localparam TDRAU_REG_CLK = 1; /* clock divider register */
|
localparam TDRAU_REG_CLK = 1; /* clock divider register */
|
||||||
localparam TDRAU_REG_AMP = 2; /* amplitude (volume) register */
|
localparam TDRAU_REG_AMP = 2; /* amplitude (volume) register */
|
||||||
|
|
||||||
// localparam LFSR_WIDTH = 15;
|
|
||||||
// localparam LFSR_TAP_IDX_1 = 3;
|
|
||||||
// localparam LFSR_TAP_IDX_2 = 0;
|
|
||||||
// localparam LFSR_INIT = 'h7672;
|
|
||||||
|
|
||||||
// localparam LFSR_WIDTH = 18;
|
// localparam LFSR_WIDTH = 18;
|
||||||
// localparam LFSR_TAP_IDX_1 = 17;
|
// localparam LFSR_TAP_IDX_1 = 17;
|
||||||
// localparam LFSR_TAP_IDX_2 = 10;
|
// localparam LFSR_TAP_IDX_2 = 10;
|
||||||
|
|
@ -138,7 +134,7 @@ module wavegen #(DATA_WIDTH=32, CLOCK_DIV_WIDTH=22, AMP_WIDTH=16) (
|
||||||
begin
|
begin
|
||||||
if (reset)
|
if (reset)
|
||||||
begin
|
begin
|
||||||
amp_out <= 0;
|
amp_out <= AMP_BIAS;
|
||||||
amp_phase <= 1;
|
amp_phase <= 1;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -153,7 +149,7 @@ module wavegen #(DATA_WIDTH=32, CLOCK_DIV_WIDTH=22, AMP_WIDTH=16) (
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
amp_out <= 0;
|
amp_out <= AMP_BIAS;
|
||||||
|
|
||||||
// reset phase bit when enabling the channel
|
// reset phase bit when enabling the channel
|
||||||
if (ctl_reg_write && wr_data[0])
|
if (ctl_reg_write && wr_data[0])
|
||||||
|
|
@ -214,6 +210,8 @@ module tdraudio #(DATA_WIDTH=32) (
|
||||||
|
|
||||||
wire running = chan0_running || chan1_running || chan2_running || chan3_running;
|
wire running = chan0_running || chan1_running || chan2_running || chan3_running;
|
||||||
|
|
||||||
|
reg was_running;
|
||||||
|
|
||||||
assign rd_data = chan0_sel ? chan0_rd_data :
|
assign rd_data = chan0_sel ? chan0_rd_data :
|
||||||
chan1_sel ? chan1_rd_data :
|
chan1_sel ? chan1_rd_data :
|
||||||
chan2_sel ? chan2_rd_data :
|
chan2_sel ? chan2_rd_data :
|
||||||
|
|
@ -247,6 +245,15 @@ module tdraudio #(DATA_WIDTH=32) (
|
||||||
|
|
||||||
assign shutdown_n = running;
|
assign shutdown_n = running;
|
||||||
|
|
||||||
|
/* detect shutdown */
|
||||||
|
always @(posedge clk)
|
||||||
|
begin
|
||||||
|
if (reset)
|
||||||
|
was_running <= 0;
|
||||||
|
else
|
||||||
|
was_running <= running;
|
||||||
|
end
|
||||||
|
|
||||||
/* delta-sigma DAC */
|
/* delta-sigma DAC */
|
||||||
always @(posedge clk)
|
always @(posedge clk)
|
||||||
begin
|
begin
|
||||||
|
|
@ -255,6 +262,9 @@ module tdraudio #(DATA_WIDTH=32) (
|
||||||
else
|
else
|
||||||
if (running)
|
if (running)
|
||||||
deltasigma_acc <= deltasigma_acc[DAC_WIDTH-1:0] + amp_sum;
|
deltasigma_acc <= deltasigma_acc[DAC_WIDTH-1:0] + amp_sum;
|
||||||
|
else
|
||||||
|
if (!running && was_running) // clear accumulator on shutdown
|
||||||
|
deltasigma_acc <= 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
/* 1-bit audio output */
|
/* 1-bit audio output */
|
||||||
|
|
|
||||||
|
|
@ -378,10 +378,10 @@
|
||||||
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
|
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
|
||||||
<RQSFiles/>
|
<RQSFiles/>
|
||||||
</Run>
|
</Run>
|
||||||
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="To compensate for optimistic delay estimation, add extra delay cost to long distance and high fanout connections. low setting, least pessimistic)" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" LaunchOptions="-jobs 6 " AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1" ParallelReportGen="true">
|
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Uses multiple algorithms for optimization, placement, and routing to get potentially better results." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" LaunchOptions="-jobs 6 " AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1" ParallelReportGen="true">
|
||||||
<Strategy Version="1" Minor="2">
|
<Strategy Version="1" Minor="2">
|
||||||
<StratHandle Name="Performance_NetDelay_low" Flow="Vivado Implementation 2024">
|
<StratHandle Name="Performance_Explore" Flow="Vivado Implementation 2024">
|
||||||
<Desc>To compensate for optimistic delay estimation, add extra delay cost to long distance and high fanout connections. low setting, least pessimistic)</Desc>
|
<Desc>Uses multiple algorithms for optimization, placement, and routing to get potentially better results.</Desc>
|
||||||
</StratHandle>
|
</StratHandle>
|
||||||
<Step Id="init_design"/>
|
<Step Id="init_design"/>
|
||||||
<Step Id="opt_design">
|
<Step Id="opt_design">
|
||||||
|
|
@ -389,14 +389,14 @@
|
||||||
</Step>
|
</Step>
|
||||||
<Step Id="power_opt_design"/>
|
<Step Id="power_opt_design"/>
|
||||||
<Step Id="place_design">
|
<Step Id="place_design">
|
||||||
<Option Id="Directive">3</Option>
|
<Option Id="Directive">0</Option>
|
||||||
</Step>
|
</Step>
|
||||||
<Step Id="post_place_power_opt_design"/>
|
<Step Id="post_place_power_opt_design"/>
|
||||||
<Step Id="phys_opt_design">
|
<Step Id="phys_opt_design">
|
||||||
<Option Id="Directive">2</Option>
|
<Option Id="Directive">0</Option>
|
||||||
</Step>
|
</Step>
|
||||||
<Step Id="route_design">
|
<Step Id="route_design">
|
||||||
<Option Id="Directive">1</Option>
|
<Option Id="Directive">0</Option>
|
||||||
</Step>
|
</Step>
|
||||||
<Step Id="post_route_phys_opt_design"/>
|
<Step Id="post_route_phys_opt_design"/>
|
||||||
<Step Id="write_bitstream">
|
<Step Id="write_bitstream">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue