-
Notifications
You must be signed in to change notification settings - Fork 15
WiP: a monolithic top level co-sim bench #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a6ff6d3
WiP: a monolithic top level co-sim bench
cedard234 e0bbdc5
feat: complete top level bench runs through
cedard234 3f6543f
feat: successful noise sim with clocking distribution enabled
cedard234 bf17d0b
chore: comments
cedard234 6999789
chore: remove hard coded spectre and xcelium entries
cedard234 99da3c1
feat: rx clock distribution
cedard234 230b4bf
feat: rx clock distribution
cedard234 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| XRUN := xrun | ||
| XRUN_OPTS := -sv_ms \ | ||
| -dmsaoi \ | ||
| -timescale 1ps/1fs \ | ||
| -access +rwc \ | ||
| -iereport \ | ||
| -plusperf \ | ||
| -64bit \ | ||
| -spectre_args "+preset=mx +mt=32" \ | ||
| -CFLAGS "-std=c++11 -g" | ||
| VAMS_DIR := ../verilog | ||
| # SPECTRE_HOME := /tools/cadence/SPECTRE/SPECTRE251 | ||
| # XCELIUM_HOME := /tools/cadence/XCELIUM/XCELIUM2409.006/ | ||
| INCLUDES := -incdir $(VAMS_DIR) -incdir $(SPECTRE_HOME)/tools.lnx86/spectre/etc/ahdl | ||
| PHY_PROBE := probe.tcl | ||
|
|
||
| # Source files | ||
| DISCIPLINES := $(SPECTRE_HOME)/tools.lnx86/spectre/etc/ahdl/disciplines.vams | ||
| CONSTANTS := $(VAMS_DIR)/constants.vams | ||
| PRIMITIVES_SV := $(VAMS_DIR)/primitives.sv | ||
| PRIMITIVES_VAMS := $(VAMS_DIR)/primitives.vams | ||
| TX_SRC := $(VAMS_DIR)/tx.sv | ||
| TX_VAMS := $(VAMS_DIR)/tx.vams | ||
| RX_SRC := $(VAMS_DIR)/rx.sv | ||
| RX_VAMS := $(VAMS_DIR)/rx.vams | ||
| PHY_SRC := $(VAMS_DIR)/phy.sv | ||
| # bbpll.vams, dcdl.vams, s2d.vams, clock_distribution.vams | ||
| CLOCKING_SRC := $(VAMS_DIR)/dcdl.vams $(VAMS_DIR)/s2d.vams $(VAMS_DIR)/clock_distribution.vams | ||
|
|
||
|
|
||
| phy: | ||
| @echo "==========================================" | ||
| @echo "Running UCIePHY Testbench with xrun..." | ||
| @echo "==========================================" | ||
| $(XRUN) $(XRUN_OPTS) \ | ||
| $(DISCIPLINES) \ | ||
| $(CONSTANTS) \ | ||
| $(PRIMITIVES_VAMS) \ | ||
| $(TX_VAMS) \ | ||
| $(RX_VAMS) \ | ||
| $(PRIMITIVES_SV) \ | ||
| $(TX_SRC) \ | ||
| $(RX_SRC) \ | ||
| $(PHY_SRC) \ | ||
| $(CLOCKING_SRC) \ | ||
| amscf.scs \ | ||
| -reflib $(XCELIUM_HOME)/tools.lnx86/affirma_ams/etc/connect_lib/connectLib:uCR \ | ||
| -amsconnrules uCR \ | ||
| -top phy_tb \ | ||
| -input $(PHY_PROBE) | ||
| @echo "UCIePHY simulation completed. Waveforms: phy_waves.shm" | ||
| @echo "" | ||
|
|
||
| clean: | ||
| @echo "Cleaning simulation outputs..." | ||
| @rm -rf worklib *.log *.shm *.diag INCA_libs xcelium.d .simvision xrun.history .cadence worklibxrun amscf.ams | ||
| @echo "Clean complete." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Xcelium UCIePHY Simulation Project | ||
|
|
||
| This directory contains the Xcelium simulation setup for the UCIePHY (Universal Chiplet Interconnect Express Physical Layer) testbench. The simulation uses mixed-signal (AMS + SystemVerilog) modeling to verify the PHY components. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before running the simulation, you **must** define the following environment variables to point to your Cadence tool installations: | ||
|
|
||
| - **SPECTRE_HOME**: Path to the Spectre installation directory. | ||
| - **AMS_HOME**: Path to the Xcelium AMS installation directory. | ||
|
|
||
| Without these variables, the Makefile will fail to locate necessary libraries and disciplines. | ||
|
|
||
| ## Running the Simulation | ||
|
|
||
| 1. Ensure you are in the `xcelium` directory. | ||
| 2. Set the environment variables as described above. | ||
| 3. Run the simulation: | ||
|
|
||
| ```bash | ||
| make phy | ||
| ``` | ||
|
|
||
| This will compile all AMS and SystemVerilog sources, elaborate the design, and run the testbench with the top-level module `phy_tb`. | ||
|
|
||
| ## Cleaning Up | ||
|
|
||
| To remove simulation artifacts (libraries, logs, waveforms): | ||
|
|
||
| ```bash | ||
| make clean | ||
| ``` | ||
|
|
||
| ## Files Overview | ||
|
|
||
| - **Makefile**: Defines the simulation flow using `xrun`. | ||
| - **amscf.scs**: AMS control file for Spectre integration. | ||
| - **probe.tcl**: Tcl script for waveform probing. | ||
| - **../verilog/**: Source files (AMS and SV) for the PHY components. | ||
|
|
||
| ## Notes | ||
|
|
||
| - The simulation uses mixed-signal mode (`-sv_ms`) to handle both analog (AMS) and digital (SystemVerilog) components. | ||
| - Waveforms are saved to `phy_waves.shm` upon completion. | ||
| - If you encounter permission or path errors, verify the environment variables and tool installations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,10 +3,13 @@ | |
| // **************************************************************** | ||
| simulator lang=spectre | ||
|
|
||
| global 0 | ||
| global 0 vdd! | ||
|
|
||
| amsd { | ||
| ie vsup=0.75 tr=5p tf=5p rout=0 | ||
| ie vsup=0.75 tr=20p tf=20p rout=0 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use 20ps for rise/fall for pessimistic estimation |
||
| } | ||
|
|
||
| tran tran stop=1u annotate=status | ||
|
|
||
| tran tran stop=1u noisefmax=64G noiseseed=32 annotate=status | ||
| // to disable noise, comment the above line and uncomment the line below | ||
| * tran tran stop=1u annotate=status | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a parameter is used in vams context, absolute scale (instead of relative scale specificed in timescale 1ps/1fs) has to be used