Skip to content

Commit 4ec94a5

Browse files
authored
Merge pull request #999 from slaclab/pre-release
Release Candidate v2.34.1
2 parents 7f0b2f5 + 0b97eb9 commit 4ec94a5

File tree

17 files changed

+1073
-634
lines changed

17 files changed

+1073
-634
lines changed

base/ram/ruckus.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source $::env(RUCKUS_QUIET_FLAG) $::env(RUCKUS_PROC_TCL)
55
loadSource -lib surf -dir "$::DIR_PATH/inferred"
66

77
# Check for min. Vivado version with XPM support
8-
if { $::env(VIVADO_VERSION) > 2019.1} {
8+
if { $::env(VIVADO_VERSION) >= 2019.1} {
99
loadSource -lib surf -dir "$::DIR_PATH/xilinx"
1010
loadSource -lib surf -path "$::DIR_PATH/dummy/SimpleDualPortRamAlteraMfDummy.vhd"
1111
loadSource -lib surf -path "$::DIR_PATH/dummy/TrueDualPortRamXpmAlteraMfDummy.vhd"

devices/AnalogDevices/ad9249/UltraScale/rtl/Ad9249Deserializer.vhd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use surf.Ad9249Pkg.all;
3333
entity Ad9249Deserializer is
3434
generic (
3535
TPD_G : time := 1 ns;
36+
SIM_DEVICE_G : string := "ULTRASCALE";
3637
IODELAY_GROUP_G : string := "DEFAULT_GROUP";
3738
IDELAY_CASCADE_G : boolean := false;
3839
IDELAYCTRL_FREQ_G : real := 300.0;
@@ -118,7 +119,7 @@ begin
118119
IS_CLK_INVERTED => '0', -- Optional inversion for CLK
119120
IS_RST_INVERTED => '0', -- Optional inversion for RST
120121
REFCLK_FREQUENCY => IDELAYCTRL_FREQ_G, -- IDELAYCTRL clock input frequency in MHz (200.0-2667.0)
121-
SIM_DEVICE => "ULTRASCALE", -- Set the device version (ULTRASCALE, ULTRASCALE_PLUS, ULTRASCALE_PLUS_ES1,
122+
SIM_DEVICE => SIM_DEVICE_G, -- Set the device version (ULTRASCALE, ULTRASCALE_PLUS, ULTRASCALE_PLUS_ES1,
122123
-- ULTRASCALE_PLUS_ES2)
123124
UPDATE_MODE => "ASYNC" -- Determines when updates to the delay will take effect (ASYNC, MANUAL,
124125
-- SYNC)
@@ -190,7 +191,7 @@ begin
190191
IS_CLK_B_INVERTED => '1', -- Optional inversion for CLK_B
191192
IS_CLK_INVERTED => '0', -- Optional inversion for CLK
192193
IS_RST_INVERTED => '0', -- Optional inversion for RST
193-
SIM_DEVICE => "ULTRASCALE" -- Set the device version (ULTRASCALE, ULTRASCALE_PLUS, ULTRASCALE_PLUS_ES1,
194+
SIM_DEVICE => SIM_DEVICE_G -- Set the device version (ULTRASCALE, ULTRASCALE_PLUS, ULTRASCALE_PLUS_ES1,
194195
)
195196
port map (
196197
FIFO_EMPTY => open, -- 1-bit output: FIFO empty flag

devices/AnalogDevices/ad9249/UltraScale/rtl/Ad9249ReadoutGroup.vhd

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ entity Ad9249ReadoutGroup is
3535
TPD_G : time := 1 ns;
3636
NUM_CHANNELS_G : natural range 1 to 8 := 8;
3737
IODELAY_GROUP_G : string := "DEFAULT_GROUP";
38+
SIM_DEVICE_G : string := "ULTRASCALE";
3839
D_DELAY_CASCADE_G : boolean := false;
3940
F_DELAY_CASCADE_G : boolean := false;
4041
IDELAYCTRL_FREQ_G : real := 200.0;
@@ -174,11 +175,6 @@ architecture rtl of Ad9249ReadoutGroup is
174175

175176
signal invertSync : sl;
176177

177-
attribute KEEP_HIERARCHY : string;
178-
attribute KEEP_HIERARCHY of AdcClk_I_Ibufds : label is "TRUE";
179-
attribute dont_touch : string;
180-
attribute dont_touch of adcDclk : signal is "TRUE";
181-
182178
begin
183179
-------------------------------------------------------------------------------------------------
184180
-- Synchronize adcR.locked across to axil clock domain and count falling edges on it
@@ -315,23 +311,21 @@ begin
315311
end if;
316312
end process axilSeq;
317313

318-
319-
AdcClk_I_Ibufds : IBUFDS
320-
generic map (
321-
DQS_BIAS => "FALSE"
322-
)
323-
port map (
324-
I => adcSerial.dClkP,
325-
IB => adcSerial.dClkN,
326-
O => adcDclk
327-
);
328-
329314
-------------------------------------------------------------------------------------------------
330315
-- Create Clocks
331316
-------------------------------------------------------------------------------------------------
332317

333318
G_MMCM : if USE_MMCME_G = true generate
334319

320+
AdcClk_I_Ibufds : IBUFDS
321+
generic map (
322+
DQS_BIAS => "FALSE"
323+
)
324+
port map (
325+
I => adcSerial.dClkP,
326+
IB => adcSerial.dClkN,
327+
O => adcDclk
328+
);
335329

336330
------------------------------------------
337331
-- Generate clocks from ADC incoming clock
@@ -384,6 +378,7 @@ begin
384378
U_FRAME_DESERIALIZER : entity surf.Ad9249Deserializer
385379
generic map (
386380
TPD_G => TPD_G,
381+
SIM_DEVICE_G => SIM_DEVICE_G,
387382
IODELAY_GROUP_G => "DEFAULT_GROUP",
388383
IDELAY_CASCADE_G => F_DELAY_CASCADE_G,
389384
IDELAYCTRL_FREQ_G => 350.0,
@@ -433,6 +428,7 @@ begin
433428
U_DATA_DESERIALIZER : entity surf.Ad9249Deserializer
434429
generic map (
435430
TPD_G => TPD_G,
431+
SIM_DEVICE_G => SIM_DEVICE_G,
436432
IODELAY_GROUP_G => "DEFAULT_GROUP",
437433
IDELAY_CASCADE_G => D_DELAY_CASCADE_G,
438434
IDELAYCTRL_FREQ_G => 350.0,

devices/Marvell/Sgmii88E1111/lvdsUltraScale/Sgmii88E1111LvdsUltraScale.vhd

Lines changed: 69 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ library ieee;
1616
use ieee.std_logic_1164.all;
1717
use ieee.numeric_std.all;
1818

19-
2019
library surf;
2120
use surf.StdRtlPkg.all;
2221
use surf.AxiStreamPkg.all;
@@ -27,42 +26,49 @@ entity Sgmii88E1111LvdsUltraScale is
2726
generic (
2827
TPD_G : time := 1 ns;
2928
STABLE_CLK_FREQ_G : real := 156.25E+6;
30-
USE_BUFG_DIV_G : boolean := false;
31-
CLKOUT1_PHASE_G : real := 90.0;
29+
PAUSE_EN_G : boolean := true;
30+
EN_AXIL_REG_G : boolean := false;
3231
PHY_G : natural range 0 to 31 := 7;
3332
AXIS_CONFIG_G : AxiStreamConfigType := EMAC_AXIS_CONFIG_C);
3433
port (
3534
-- clock and reset
36-
extRst : in sl; -- active high
37-
stableClk : in sl; -- Stable clock reference
38-
phyClk : out sl;
39-
phyRst : out sl;
35+
extRst : in sl; -- active high
36+
stableClk : in sl; -- Stable clock reference
37+
phyClk : out sl;
38+
phyRst : out sl;
4039
-- Local Configurations/status
41-
localMac : in slv(47 downto 0); -- big-Endian configuration
42-
phyReady : out sl;
43-
linkUp : out sl;
44-
speed10 : out sl;
45-
speed100 : out sl;
46-
speed1000 : out sl;
40+
localMac : in slv(47 downto 0); -- big-Endian configuration
41+
phyReady : out sl;
42+
linkUp : out sl;
43+
speed10 : out sl;
44+
speed100 : out sl;
45+
speed1000 : out sl;
4746
-- Interface to Ethernet Media Access Controller (MAC)
48-
macClk : in sl;
49-
macRst : in sl;
50-
obMacMaster : out AxiStreamMasterType;
51-
obMacSlave : in AxiStreamSlaveType;
52-
ibMacMaster : in AxiStreamMasterType;
53-
ibMacSlave : out AxiStreamSlaveType;
47+
macClk : in sl;
48+
macRst : in sl;
49+
obMacMaster : out AxiStreamMasterType;
50+
obMacSlave : in AxiStreamSlaveType;
51+
ibMacMaster : in AxiStreamMasterType;
52+
ibMacSlave : out AxiStreamSlaveType;
53+
-- Slave AXI-Lite Interface
54+
axilClk : in sl := '0';
55+
axilRst : in sl := '0';
56+
axilReadMaster : in AxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C;
57+
axilReadSlave : out AxiLiteReadSlaveType;
58+
axilWriteMaster : in AxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C;
59+
axilWriteSlave : out AxiLiteWriteSlaveType;
5460
-- ETH external PHY Ports
55-
phyClkP : in sl; -- 625.0 MHz
56-
phyClkN : in sl;
57-
phyMdc : out sl;
58-
phyMdio : inout sl;
59-
phyRstN : out sl; -- active low
60-
phyIrqN : in sl; -- active low
61+
phyClkP : in sl; -- 625.0 MHz
62+
phyClkN : in sl;
63+
phyMdc : out sl;
64+
phyMdio : inout sl;
65+
phyRstN : out sl; -- active low
66+
phyIrqN : in sl; -- active low
6167
-- LVDS SGMII Ports
62-
sgmiiRxP : in sl;
63-
sgmiiRxN : in sl;
64-
sgmiiTxP : out sl;
65-
sgmiiTxN : out sl);
68+
sgmiiRxP : in sl;
69+
sgmiiRxN : in sl;
70+
sgmiiTxP : out sl;
71+
sgmiiTxN : out sl);
6672
end entity Sgmii88E1111LvdsUltraScale;
6773

6874
architecture mapping of Sgmii88E1111LvdsUltraScale is
@@ -181,36 +187,43 @@ begin
181187
dataIn => phyIrqN,
182188
dataOut => phyIrq);
183189

184-
U_1GigE : entity surf.GigEthLvdsUltraScaleWrapper
190+
U_1GigE : entity surf.GigEthLvdsUltraScale
185191
generic map (
186-
TPD_G => TPD_G,
187-
USE_BUFG_DIV_G => USE_BUFG_DIV_G,
188-
CLKOUT1_PHASE_G => CLKOUT1_PHASE_G,
189-
AXIS_CONFIG_G => (others => AXIS_CONFIG_G))
192+
TPD_G => TPD_G,
193+
PAUSE_EN_G => PAUSE_EN_G,
194+
EN_AXIL_REG_G => EN_AXIL_REG_G,
195+
AXIS_CONFIG_G => AXIS_CONFIG_G)
190196
port map (
191197
-- Local Configurations
192-
localMac(0) => localMac,
198+
localMac => localMac,
193199
-- Streaming DMA Interface
194-
dmaClk(0) => macClk,
195-
dmaRst(0) => macRst,
196-
dmaIbMasters(0) => obMacMaster,
197-
dmaIbSlaves(0) => obMacSlave,
198-
dmaObMasters(0) => ibMacMaster,
199-
dmaObSlaves(0) => ibMacSlave,
200-
-- Misc. Signals
201-
extRst => extRst,
202-
phyClk => phyClock,
203-
phyRst => phyReset,
204-
phyReady(0) => phyReady,
205-
speed_is_10_100(0) => sp10_100,
206-
speed_is_100(0) => sp100,
207-
-- MGT Clock Port
208-
sgmiiClkP => phyClkP,
209-
sgmiiClkN => phyClkN,
210-
-- MGT Ports
211-
sgmiiTxP(0) => sgmiiTxP,
212-
sgmiiTxN(0) => sgmiiTxN,
213-
sgmiiRxP(0) => sgmiiRxP,
214-
sgmiiRxN(0) => sgmiiRxN);
200+
dmaClk => macClk,
201+
dmaRst => macRst,
202+
dmaIbMaster => obMacMaster,
203+
dmaIbSlave => obMacSlave,
204+
dmaObMaster => ibMacMaster,
205+
dmaObSlave => ibMacSlave,
206+
-- Slave AXI-Lite Interface
207+
axilClk => axilClk,
208+
axilRst => axilRst,
209+
axilReadMaster => axilReadMaster,
210+
axilReadSlave => axilReadSlave,
211+
axilWriteMaster => axilWriteMaster,
212+
axilWriteSlave => axilWriteSlave,
213+
-- Speed selection
214+
speed_is_10_100 => sp10_100,
215+
speed_is_100 => sp100,
216+
-- PHY + MAC signals
217+
extRst => extRst,
218+
ethClk => phyClock,
219+
ethRst => phyReset,
220+
phyReady => phyReady,
221+
-- SGMII / LVDS Ports
222+
sgmiiClkP => phyClkP, -- 625 MHz
223+
sgmiiClkN => phyClkN, -- 625 MHz
224+
sgmiiTxP => sgmiiTxP,
225+
sgmiiTxN => sgmiiTxN,
226+
sgmiiRxP => sgmiiRxP,
227+
sgmiiRxN => sgmiiRxN);
215228

216229
end mapping;

devices/Maxim/rtl/Max5443.vhd

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
-------------------------------------------------------------------------------
2+
-- Company : SLAC National Accelerator Laboratory
3+
-------------------------------------------------------------------------------
4+
-- Description: Max5443 DAC Module
5+
-------------------------------------------------------------------------------
6+
-- This file is part of 'SLAC Firmware Standard Library'.
7+
-- It is subject to the license terms in the LICENSE.txt file found in the
8+
-- top-level directory of this distribution and at:
9+
-- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
10+
-- No part of 'SLAC Firmware Standard Library', including this file,
11+
-- may be copied, modified, propagated, or distributed except according to
12+
-- the terms contained in the LICENSE.txt file.
13+
-------------------------------------------------------------------------------
14+
15+
library ieee;
16+
use ieee.std_logic_1164.all;
17+
use ieee.std_logic_unsigned.all;
18+
use ieee.std_logic_arith.all;
19+
20+
library surf;
21+
use surf.StdRtlPkg.all;
22+
use surf.AxiLitePkg.all;
23+
24+
entity Max5443 is
25+
generic (
26+
TPD_G : time := 1 ns;
27+
CLK_PERIOD_G : real := 10.0e-9;
28+
NUM_CHIPS_G : positive := 1);
29+
port (
30+
-- AXI-Lite Register Interface
31+
axilClk : in sl;
32+
axilRst : in sl;
33+
axilReadMaster : in AxiLiteReadMasterType;
34+
axilReadSlave : out AxiLiteReadSlaveType;
35+
axilWriteMaster : in AxiLiteWriteMasterType;
36+
axilWriteSlave : out AxiLiteWriteSlaveType;
37+
-- Guard ring DAC interfaces
38+
dacSclk : out sl;
39+
dacDin : out sl;
40+
dacCsb : out slv(NUM_CHIPS_G-1 downto 0);
41+
dacClrb : out sl);
42+
end Max5443;
43+
44+
architecture rtl of Max5443 is
45+
46+
type RegType is record
47+
vDacSetting : Slv16Array(NUM_CHIPS_G-1 downto 0);
48+
axilReadSlave : AxiLiteReadSlaveType;
49+
axilWriteSlave : AxiLiteWriteSlaveType;
50+
end record RegType;
51+
52+
constant REG_INIT_C : RegType := (
53+
vDacSetting => (others => (others => '0')),
54+
axilReadSlave => AXI_LITE_READ_SLAVE_INIT_C,
55+
axilWriteSlave => AXI_LITE_WRITE_SLAVE_INIT_C);
56+
57+
signal r : RegType := REG_INIT_C;
58+
signal rin : RegType;
59+
60+
signal dacDinSig : slv(NUM_CHIPS_G-1 downto 0);
61+
signal dacSclkSig : slv(NUM_CHIPS_G-1 downto 0);
62+
signal dacClrbSig : slv(NUM_CHIPS_G-1 downto 0);
63+
64+
begin
65+
66+
dacDin <= uOr(dacDinSig);
67+
dacSclk <= uOr(dacSclkSig);
68+
dacClrb <= uOr(dacClrbSig);
69+
70+
-------------------------------
71+
-- Configuration Register
72+
-------------------------------
73+
comb : process (axilReadMaster, axilRst, axilWriteMaster, r) is
74+
variable v : RegType;
75+
variable axilEp : AxiLiteEndPointType;
76+
77+
begin
78+
-- Latch the current value
79+
v := r;
80+
81+
-- Determine the transaction type
82+
axiSlaveWaitTxn(axilEp, axilWriteMaster, axilReadMaster, v.axilWriteSlave, v.axilReadSlave);
83+
84+
-- Map out standard registers
85+
for i in 0 to NUM_CHIPS_G-1 loop
86+
axiSlaveRegister(axilEp, toSlv(4*i, 8), 0, v.vDacSetting(i));
87+
end loop;
88+
89+
-- Closeout the transaction
90+
axiSlaveDefault(axilEp, v.axilWriteSlave, v.axilReadSlave, AXI_RESP_DECERR_C);
91+
92+
-- Synchronous Reset
93+
if axilRst = '1' then
94+
v := REG_INIT_C;
95+
end if;
96+
97+
-- Register the variable for next clock cycle
98+
rin <= v;
99+
100+
axilWriteSlave <= r.axilWriteSlave;
101+
axilReadSlave <= r.axilReadSlave;
102+
103+
end process comb;
104+
105+
seq : process (axilClk) is
106+
begin
107+
if rising_edge(axilClk) then
108+
r <= rin after TPD_G;
109+
end if;
110+
end process seq;
111+
112+
-----------------------------------------------
113+
-- DAC Controller
114+
-----------------------------------------------
115+
G_MAX5443 : for i in 0 to NUM_CHIPS_G-1 generate
116+
U_DacCntrl : entity surf.Max5443DacCntrl
117+
generic map (
118+
TPD_G => TPD_G)
119+
port map (
120+
sysClk => axilClk,
121+
sysClkRst => axilRst,
122+
dacData => r.vDacSetting(i),
123+
dacDin => dacDinSig(i),
124+
dacSclk => dacSclkSig(i),
125+
dacCsL => dacCsb(i),
126+
dacClrL => dacClrbSig(i));
127+
end generate;
128+
129+
end rtl;

0 commit comments

Comments
 (0)