Skip to content

Commit 69a9174

Browse files
committed
macro_osc double speed :D
1 parent e8440e6 commit 69a9174

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gateware/src/top/macro_osc/fw/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use hal::pca9635::*;
2929
tiliqua_hal::impl_dma_display!(DMADisplay, H_ACTIVE, V_ACTIVE, VIDEO_ROTATE_90);
3030

3131
pub const TIMER0_ISR_PERIOD_MS: u32 = 5;
32-
const BLOCK_SIZE: usize = 64;
32+
const BLOCK_SIZE: usize = 128;
3333
// PSRAM heap for big audio buffers.
3434
const HEAP_START: usize = PSRAM_BASE + (PSRAM_SZ_BYTES / 2);
3535
const HEAP_SIZE: usize = 128*1024;

gateware/src/top/macro_osc/top.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class AudioFIFOPeripheral(wiring.Component):
7070
class FifoLenReg(csr.Register, access="r"):
7171
fifo_len: csr.Field(csr.action.R, unsigned(16))
7272

73-
def __init__(self, fifo_sz=4*4, fifo_data_width=32, granularity=8, elastic_sz=64*3):
73+
def __init__(self, fifo_sz=4*4, fifo_data_width=32, granularity=8, elastic_sz=128*3):
7474
regs = csr.Builder(addr_width=6, data_width=8)
7575

7676
# Out and Aux FIFOs
@@ -133,9 +133,9 @@ def elaborate(self, platform):
133133

134134
# Resample 12kHz to 48kHz
135135
m.submodules.resample_up0 = resample_up0 = dsp.Resample(
136-
fs_in=12000, n_up=4, m_down=1)
136+
fs_in=24000, n_up=2, m_down=1)
137137
m.submodules.resample_up1 = resample_up1 = dsp.Resample(
138-
fs_in=12000, n_up=4, m_down=1)
138+
fs_in=24000, n_up=2, m_down=1)
139139
wiring.connect(m, self._fifo0.r_stream, resample_up0.i)
140140
wiring.connect(m, self._fifo1.r_stream, resample_up1.i)
141141

0 commit comments

Comments
 (0)