Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Simulation of a component that's not fully compiled

Status
Not open for further replies.
I can't do it anymore. I think I'm messing in the libraries. I have to use avs_aes_lib and work.
Could someone download the source, compile it and tell me what they got?
 

What do you think you're messing?

just open it up into a different folder and try compiling again.
 

When creating a fresh folder I have only this when compiling:
Code:
# QuestaSim-64 vcom 10.2c Compiler 2013.07 Jul 19 2013
# -- Loading package STANDARD
# -- Loading package TEXTIO
# -- Loading package std_logic_1164
# -- Loading package NUMERIC_STD
# -- Loading package avs_aes_pkg
# -- Compiling entity avs_aes_tb
# -- Compiling architecture arch1 of avs_aes_tb
# -- Loading entity avs_AES
But when simulating I get that:
Code:
# ** Warning: (vsim-3473) Component instance "AES_CORE_1 : AES_CORE" is not bound.
#    Time: 0 ns  Iteration: 0  Instance: /avs_aes_tb/avs_aes_1 File: ../rtl/VHDL/avs_aes.vhd
I think it shows the problem but it's only a warning, not an error. Why?
 

yes, you only compiled the testbench.
You havent compiled any other files.
 

Assuming this is Avalon core.

There is shed load of information contained within the downloaded directory.

There is a manual (trunk/doc/manual/avs_aes) which states the following

8 Simulation
8.1 Testbench
In ./bench/VHDL/ a “self-checking testbench” is provided which runs tests for a default TESTKEYSIZE
is 256 Bit . For different key lengths the constant TESTKEYSIZE has to be changed appropriately.
Expected results for all test cases and key lengths are included. The expected results were
generated by AES Calculator applet, written by Lawrie Brown from ADFA, Canberra Australia
[7]. The testbench consists of a sequence of 5 test cases:
1. load key1, load data1, encrypt : (basic encryption test)
2. key1, data1, decrypt: (basic decryption test)
3. key1, data1, encrypt: (test if internal state was changed)
4. key1, data2, encrypt: (encryption test with new data)
5. key2, data2, encrypt: (encryption test with new key)
8.2 Simulation
The component library is “avs_aes_lib”. All files are expected to be compiled into this library as
all files depend at least on the package avs_aes_lib.avs_aes_pkg.
A Makefile for Mentor Graphics® Modelsim® is given in ./sim/. The default make target simaes

Furthermore there is information available in the truck/doc/sw/html/tree.html


Taking a step back and just trying to get the following to work....
We are interested in trunk/bench & trunk/rtl


I gave the following a quick go.

Code TCL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
vlib avs_aes_lib
#vmap work work
set path_rtl "/home/P_9999_00121/iss_a.1/Downloads/avs_aes/trunk/rtl/VHDL/"
 
foreach file [glob -nocomplain -directory $path_rtl *.vhd] {
  vcom -just p -work avs_aes_lib $file
}
foreach file [glob -nocomplain -directory $path_rtl *.vhd] {
  vcom -just e -work avs_aes_lib $file
}
foreach file [glob -nocomplain -directory $path_rtl *.vhd] {
  vcom -just b -work avs_aes_lib $file
}
foreach file [glob -nocomplain -directory $path_rtl *.vhd] {
  vcom -just a -work avs_aes_lib $file
}



What I found was
"
# ** Error: /home/P_9999_00121/iss_a.1/Downloads/avs_aes/trunk/rtl/VHDL/sboxM4k.vhd(53): Library altera_mf not found.
# ** Error: /home/P_9999_00121/iss_a.1/Downloads/avs_aes/trunk/rtl/VHDL/sboxM4k.vhd(54): (vcom-1136) Unknown identifier "altera_mf".
"
"
# ** Error: /home/P_9999_00121/iss_a.1/Downloads/avs_aes/trunk/rtl/VHDL/sboxM4k.vhd(53): Library altera_mf not found.
# ** Error: /home/P_9999_00121/iss_a.1/Downloads/avs_aes/trunk/rtl/VHDL/sboxM4k.vhd(54): (vcom-1136) Unknown identifier "altera_mf".
"

Seems to me you need to have some altera parts compiled into your modelsim/questa work area.
 

I've just came back and read your post. I didn't read everything from the documentation as I'm french, I don't understand everything but I'll do it once again tomorrow.

Now I've switch from Questa to ModelsimASE as the altera libraries are required and I get that:
Code:
# ** Error: (vsim-7) Failed to open VHDL file "sbox_inv.hex" in rb mode.
I've read several messages on this very forum but nothing resolved the problem.
Any idea?
 

I'm assuming the sbox_inv.hex file is ROM data that is getting loaded in a memory when the simulation runs.

Find the location of the file sbox_inv.hex in the directory structure. Note where it is located. Now determine where you are running the simulation (i.e. pwd in the console window). Find what file calls out the sbox_inv.hex and make sure the relative directory (or absolute directory) and the current .hex file location are the same. If they aren't change either where the file resides or fix the path in the file that requires the sbox_inv.hex data.

You can use Questa (it's faster than Modelsim AE, assuming you mean the Altera Edition), just compile the Altera libraries, they have the procedure in the Altera Quartus-II manuals.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top