gateware: Add pipeline to Demodulation

- Fix timing violations at 125MHz sys frequency
This commit is contained in:
linuswck 2025-01-10 18:49:22 +08:00
parent 546725dff0
commit 7eb4cbb0aa
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
diff --git a/gateware/logic/modulate.py b/gateware/logic/modulate.py
index c750306..ffba1b2 100644
--- a/gateware/logic/modulate.py
+++ b/gateware/logic/modulate.py
@@ -45,12 +45,14 @@ class Demodulate(Module, AutoCSR):
cordic_mode="rotate",
func_mode="circular",
)
- self.comb += [
+ self.sync += [
# cordic input
self.cordic.xi.eq(self.x),
self.cordic.zi.eq(
((self.phase * self.multiplier.storage) + self.delay.storage) << 1
- ),
+ )
+ ]
+ self.comb += [
# cordic output
self.i.eq(self.cordic.xo >> 1),
self.q.eq(self.cordic.yo >> 1),

View File

@ -40,6 +40,7 @@
./fast-servo/pid_pipeline.patch ./fast-servo/pid_pipeline.patch
./fast-servo/pid_err_sig_pipeline.patch ./fast-servo/pid_err_sig_pipeline.patch
./fast-servo/linien-gateware-chain-pipeline.patch ./fast-servo/linien-gateware-chain-pipeline.patch
./fast-servo/linien-demodulate_add_pipeline.patch
]; ];
}; };