AES crypto engine written in System Verilog and emulated on the Mentor Veloce. First place winner of Mentor Graphics Need For Speed Emulation Competition 2016.
Change the way the key expansion module works and the interface to the top level encoder and decoder so that the key expansion module includes the buffering of the round keys and then is responsible for sending the appropriate round key during the correct cycle to the top level modules. The interface between the top level and key expansion would be an array of round key signals, 1 for each round delayed the appropriate number of clock cycles inside the key expansion module.
Enable Questa simulation profiling and use it with a veloce run to see where the software execution time is being sent. Should be able to identify the bottlenecks by looking at this report.
Currently, we produce all of the rounds keys upfront and then buffer them between each round. Not all round keys need to be generated upfront and some of them can be delayed until later clock cycles. In addition to improving the number of operations occurring in one clock cycle, this would also improve the amount of data that needs to be buffered.
We are only using the valid bit in the submodules for an assertion. It isn't doing anything for the design once it's synthesized.
We have two options:
Remove it
Block off all instances of it's propagation through submodules through #ifdefs that will remove it for synthesis, but keep it for simulation/emulation
I would prefer option 1 to clean it up, and it has debatable value even in simulation - if there is invalid input to a submodule, we will see invalid input for at least one clock cycle, which will be detected by our test bench at the top level.
Add assertions that check that the input isn't equivalent to the output of the encoder/decoder and vice versa for the seeded tests that don't directly test the validity of the intermediate data.
Currently we use only the plain text data to run through the encoder -> decoder and verify the output of the decoder matches the input of the encoder. This task is to add an instantiation of the decoder -> encoder and use the encrypted data as input to these instantiations. In this case we verify the input of the decoder matches the output of the encoder.
In the Transactor add an instance of the decoder and encoder hooked up so that encrypted data is decoded and then encoded. Also add an assertion to check this. This will increase the computational burden on the emulator and will allow for better test coverage when doing "seeded" testing.
Currently a round key for each round is buffered after each round and kept around until the last round. This needs to be improved because prior round's round keys aren't needed any longer and no longer need to be buffered.
According to the Veloce Assertions User's Guide, the first step to enabling assertions on the emulator is to setup "0-in" and add additional command line and veloce.config file.
Currently we support compilation time support for choosing between the 3 different AES configurations. Change this to be an instantiation parameter that controls what AES configuration a particular AES encoder and decoder instantiation is using. This is a necessary step to allow for parallel testing of the 3 AES configurations.
Add capabilities to the transactor and the HVL test bench to support a single "testcase" sent to the emulator to be utilized as the base test case for creating many test cases on the emulator. This will decrease communication overhead and increase the amount of computation to be done on the emulator for a particular test case.
In the AESTestDefninitions.sv file there a several places in the test classes where we declare signals of explicit width were we could instead use the typedefs. Fix these.
We currently only have a Veloce-based testbench for the top level-modules.
Debugging top-level issues will be easier if we have a testbench that excludes the scemi pipe and veloce complexities. We should also add a "standalone" mode to the makefile that compiles without any of the veloce dependencies.
Our project doesn't have many opportunities for assertion use without reimplementing the AES algorithm in SV assertion language, but we can at least make sure we don't have any unknowns in our design.
Each module should have a !$isunknown on all inputs.
The valid signals go high at the appropriate clock cycle in the xactor, but the testOut structure doesn't have room for them. The top level test bench I don't think ever receives these values (they're always 0, not x, which is curious).
I was also seeing X's for expected data in the top level, but I didn't debug that enough to have confidence that it's not an artifact of another issue.
Change the transactor to use assertions in the transactor to validate that the output of the encoder and decoder are correct instead of sending the data back to the hvl testbench.