Skip to content
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

[aes] aes_core simulation using ModelSim #16994

Closed
Adam11072000 opened this issue Jan 6, 2023 · 3 comments
Closed

[aes] aes_core simulation using ModelSim #16994

Adam11072000 opened this issue Jan 6, 2023 · 3 comments
Labels
Component:DV DV issue: testbench, test case, etc. IP:aes Type:Question Questions

Comments

@Adam11072000
Copy link

Description

Hello,

we're trying to simulate aes_core module using ModelSim simulator with Vivado IDE and we're getting this error:

** Error: ../../../../hw/ip/prim/rtl/prim_lfsr.sv(467): (vlog-2980) Error: The 'slice_size' portion of the streaming concatenation operator must

be a simple data type or a constant expression.

the error refers to:
{<<LfsrIdxDw{col}};
which is a correct syntax byt is failing with ModelSim

we've tried verilator too but we cannot seem to find a way to generate waveforms for aes module.
can you help?

thanks

@vogelpi
Copy link
Contributor

vogelpi commented Jan 9, 2023

Hi @Adam11072000 ,
at the moment we use primarily VCS and Xcelium for OpenTitan. Other simulators like Questa/ModelSim might work or not. As I don't have access to this tool, I cannot really assist here.

Regarding Verilator, I see two options to get traces:

  1. You use the Verilated simulation of the Earlgrey top-level which also instantiates the AES core. You can run e.g. aes_smoketest and enable tracing to get some AES waves. For details, please refer to the documentation of the Verilator setup.
  2. I have developed a scratch verification TB in Verilator to develop the AES unit. It's not in the repository but on my personal branch here: https://github.com/vogelpi/opentitan/tree/aes-dev-verilator For details on how to run it, please refer to the README.

@vogelpi vogelpi added Component:DV DV issue: testbench, test case, etc. IP:aes Type:Question Questions labels Jan 9, 2023
@m-temp
Copy link
Contributor

m-temp commented Jan 9, 2023

When using verilator, you could also have a look at my branch. Unfortunately, it's very out of date (better not to use it as I don't know it it runs with the current aes core), but my commented aes_tlul_sequence might help to understand the bus communication better and the python script can be used to generate longer stimuli.

@moidx moidx added this to the Community Support milestone Jan 27, 2023
@vogelpi
Copy link
Contributor

vogelpi commented Jul 21, 2023

I am closing this issue as the original question on how to get AES waves using Verilator has been answered and there hasn't been any activity in here for more than 6 months now. Also #19216 now adds a simple Verilator testbench for the AES cipher core on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. IP:aes Type:Question Questions
Projects
None yet
Development

No branches or pull requests

4 participants