From e0f954c28665d40f070b6ec753d1ed04fdb202d0 Mon Sep 17 00:00:00 2001 From: mkwiatko Date: Tue, 5 Nov 2019 13:59:25 -0800 Subject: [PATCH 1/3] Fixing saciClk not present (when SACI_CLK_HALF_PERIOD_C=64) --- protocols/saci/rtl/SaciMaster2.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/saci/rtl/SaciMaster2.vhd b/protocols/saci/rtl/SaciMaster2.vhd index a840fac45e..63697558e4 100644 --- a/protocols/saci/rtl/SaciMaster2.vhd +++ b/protocols/saci/rtl/SaciMaster2.vhd @@ -68,7 +68,7 @@ architecture rtl of SaciMaster2 is shiftCount : slv(5 downto 0); --Saci clk gen - clkCount : slv(SACI_CLK_COUNTER_SIZE_C-1 downto 0); + clkCount : slv(SACI_CLK_COUNTER_SIZE_C downto 0); saciClkRising : sl; saciClkFalling : sl; From 8257415bef6b570523ac4b13ad84fc91db2f7418 Mon Sep 17 00:00:00 2001 From: mkwiatko Date: Mon, 11 Nov 2019 18:23:47 -0800 Subject: [PATCH 2/3] help to close timing at higher clock frequency --- .../ad9249/7Series/rtl/Ad9249ReadoutGroup.vhd | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/devices/AnalogDevices/ad9249/7Series/rtl/Ad9249ReadoutGroup.vhd b/devices/AnalogDevices/ad9249/7Series/rtl/Ad9249ReadoutGroup.vhd index f0dfb8fca5..1bb59834c0 100644 --- a/devices/AnalogDevices/ad9249/7Series/rtl/Ad9249ReadoutGroup.vhd +++ b/devices/AnalogDevices/ad9249/7Series/rtl/Ad9249ReadoutGroup.vhd @@ -77,6 +77,8 @@ architecture rtl of Ad9249ReadoutGroup is readoutDebug1 : slv16Array(NUM_CHANNELS_G-1 downto 0); lockedCountRst : sl; invert : sl; + curDelayFrame : slv(4 downto 0); + curDelayData : slv5Array(NUM_CHANNELS_G-1 downto 0); end record; constant AXIL_REG_INIT_C : AxilRegType := ( @@ -89,7 +91,9 @@ architecture rtl of Ad9249ReadoutGroup is readoutDebug0 => (others => (others => '0')), readoutDebug1 => (others => (others => '0')), lockedCountRst => '0', - invert => '0' + invert => '0', + curDelayFrame => (others => '0'), + curDelayData => (others => (others => '0')) ); signal lockedSync : sl; @@ -211,7 +215,9 @@ begin v.dataDelaySet := (others => '0'); v.frameDelaySet := '0'; - v.axilReadSlave.rdata := (others => '0'); + + v.curDelayFrame := curDelayFrame; + v.curDelayData := curDelayData; -- Store last two samples read from ADC if (debugDataValid = '1' and axilR.freezeDebug = '0') then @@ -234,9 +240,9 @@ begin -- Override read from r.delay and use curDealy output from delay primative instead for i in 0 to NUM_CHANNELS_G-1 loop - axiSlaveRegisterR(axilEp, X"00"+toSlv((i*4), 8), 0, curDelayData(i)); + axiSlaveRegisterR(axilEp, X"00"+toSlv((i*4), 8), 0, axilR.curDelayData(i)); end loop; - axiSlaveRegisterR(axilEp, X"20", 0, curDelayFrame); + axiSlaveRegisterR(axilEp, X"20", 0, axilR.curDelayFrame); -- Debug output to see how many times the shift has needed a relock From 3d9e4024eadb2634bcc2cb4a5435723f937fc58a Mon Sep 17 00:00:00 2001 From: mkwiatko Date: Tue, 19 Nov 2019 16:32:29 -0800 Subject: [PATCH 3/3] Microblaze cannot make 1 byte writes to the AxiDualPortRam anymore. Fixing in the ssi_printf by changingXil_Out8 to Xil_Out32. --- xilinx/general/sdk/common/ssi_printf.c | 7 ++++++- xilinx/general/sdk/common/ssi_printf.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xilinx/general/sdk/common/ssi_printf.c b/xilinx/general/sdk/common/ssi_printf.c index 62669ec137..f95471c7b8 100644 --- a/xilinx/general/sdk/common/ssi_printf.c +++ b/xilinx/general/sdk/common/ssi_printf.c @@ -35,7 +35,12 @@ void ssi_putc ( void* p, char c) { // Dual port ram buffer if enabled if ( pp->buffSize > 0 ) { - Xil_Out8(pp->buffBase+4+pp->buffPtr, c); + //Xil_Out8(pp->buffBase+4+pp->buffPtr, c); + if (pp->buffPtr%4 == 0) + pp->buffWord = c; + else + pp->buffWord |= (c << (pp->buffPtr%4)*8); + Xil_Out32(pp->buffBase+4+(pp->buffPtr/4)*4, pp->buffWord); // Adjust pointer pp->buffPtr++; diff --git a/xilinx/general/sdk/common/ssi_printf.h b/xilinx/general/sdk/common/ssi_printf.h index 9f1bf4b2a3..c28aa6402d 100644 --- a/xilinx/general/sdk/common/ssi_printf.h +++ b/xilinx/general/sdk/common/ssi_printf.h @@ -22,6 +22,7 @@ struct ssi_printf_type { uint16_t buffSize; uint16_t buffPtr; uint16_t buffTot; + uint32_t buffWord; }; void ssi_putc ( void* p, const char c);