Frequently Asked Questions: Difference between revisions
Line 1: | Line 1: | ||
== General FAQ == | == General FAQ == | ||
===Why is Simulation/building bit file/ (insert here) so slow?=== | ===Why is Simulation/building bit file/ (insert here) so slow?=== | ||
If you are using the the cyfiles drive to do your work, these activities all seem to run much slower. The reason is that the cyfiles is a network mapped drive, so all reads/writes will have to traverse the network. To get around this, you can use the /tmp/ directory. You can copy your project to a directory, such as /tmp/.[username]/[projectfile]. The tmp directories are occasionally cleaned out, so do not leave unsaved work there. | If you are using the the cyfiles drive to do your work, these activities all seem to run much slower. The reason is that the cyfiles is a network mapped drive, so all reads/writes will have to traverse the network. To get around this, you can use the /tmp/ directory. You can copy your project to a directory, such as /tmp/.[username]/[projectfile]. The tmp directories are occasionally cleaned out, so do not leave unsaved work there. [[Media:UseTmpScript.sh | Here]] is a script that will copy a give folder the the path of /tmp/.[username]/[name of folder]. The script will check to see if there is already a directory there with the same name, and if so it will alert the user. If not it will just copy the directory. *IMPORTANT* Ensure to make a copy of any changes back into your actual working directory, since the /tmp/ directory is routinely cleaned up. | ||
=== How to start my own custom personality project? === | === How to start my own custom personality project? === |
Revision as of 23:03, 12 February 2013
General FAQ
Why is Simulation/building bit file/ (insert here) so slow?
If you are using the the cyfiles drive to do your work, these activities all seem to run much slower. The reason is that the cyfiles is a network mapped drive, so all reads/writes will have to traverse the network. To get around this, you can use the /tmp/ directory. You can copy your project to a directory, such as /tmp/.[username]/[projectfile]. The tmp directories are occasionally cleaned out, so do not leave unsaved work there. Here is a script that will copy a give folder the the path of /tmp/.[username]/[name of folder]. The script will check to see if there is already a directory there with the same name, and if so it will alert the user. If not it will just copy the directory. *IMPORTANT* Ensure to make a copy of any changes back into your actual working directory, since the /tmp/ directory is routinely cleaned up.
How to start my own custom personality project?
Use the cnyScript as described in this tutorial: Convey PDK Tutorial
How to add new verilog files or directories to a PDK project?
By default, the PDK looks like the project/verilog directory and compiles all .v files found there. To add other Verilog directories, use this makefile variable:
USER_VERILOG_DIRS += ../../verilog
Simulator Related
Where can I find the personality signals?
You can find your custom personality signals in the "sim" window in ModelSim under testbench > cae_fpga0 > ae_top > core > cae_pers
How to keep the waves I simulated?
After adding the signals to the wave window, make sure to click anywhere in the waves window. Then, click the save button and save the current signals as "do" file. Next time you want to show the previous signals, open ModelSim using the command:
vsim &
Then, in the ModelSim command-line, type:
do sim/wave.do
Finally, click the "open" button and open the "vsim.wlf" file in the "sim" directory of your project.
How to run Modelsim GUI while simulating?
You may run the simulation in interactive mode by adding the following line to the makefile in the sim directory:
USER_SIM_OPTIONS = -gui
Another option is to edit the test bench (sim/tb_user.v shown below) to dump the waveforms to a file, then run the hardware simulator via command line, and finally open up the waveform file (vsim -v ./sim/vsim.wlf). This has the benefit of dumping all the signals (if your wave.do file was missing something, you'd have to rerun the simulation).
`timescale 1 ns / 1 ps module tb_user(); initial begin // Insert user code here, such as signal dumping // set CNY_PDK_TB_USER_VLOG variable in sim/makefile `include "PDK_SIM_CONFIG.vh" `ifdef AE0_PRESENT $wlfdumpvars(5,testbench.cae_fpga0.ae_top.core.cae_pers); `endif `ifdef AE1_PRESENT $wlfdumpvars(5,testbench.cae_fpga1.ae_top.core.cae_pers); `endif `ifdef AE2_PRESENT $wlfdumpvars(5,testbench.cae_fpga2.ae_top.core.cae_pers); `endif `ifdef AE3_PRESENT $wlfdumpvars(5,testbench.cae_fpga3.ae_top.core.cae_pers); `endif end endmodule
Emulator Related
How to read AEG registers in the emulator?
You can use the following function:
uint64 AegRead(int aeId, int aegIdx);
How to read/write the memory in the emulator?
You can use the functions AeMemLoad and AeMemStore to read and write from/to the memory as follows:
bool AeMemLoad (int aeId, int mcId, unint64 addr, int size, bool bSigned, uint64 &data);
bool AeMemStore (int aeId, int mcId, unint64 addr, int size, bool bSigned, uint64 &data);