From 3f68ae61efe21ca19a3a12bf0f2bf7380bac2af4 Mon Sep 17 00:00:00 2001 From: Peter Tanner Date: Wed, 4 Sep 2024 21:05:28 +0800 Subject: [PATCH] Update commandline for compile vhd questa --- ...4-08-19-ELEC4406ELEC2311-notes-and-tips.md | 142 +++++++++++++++++- 1 file changed, 140 insertions(+), 2 deletions(-) diff --git a/_posts/2024-08-19-ELEC4406ELEC2311-notes-and-tips.md b/_posts/2024-08-19-ELEC4406ELEC2311-notes-and-tips.md index b002c1d..e221ae7 100644 --- a/_posts/2024-08-19-ELEC4406ELEC2311-notes-and-tips.md +++ b/_posts/2024-08-19-ELEC4406ELEC2311-notes-and-tips.md @@ -15,8 +15,21 @@ My recommendation is to use `qrun` and do things in the terminal with `assert`s For some reason, I can't get incremental compilation working and it just causes more issuse than the time it saves right now, since it results in changes not affecting the simulation, so for now I am cleanly rebuilding each simulation. -```cmd -qrun main.vhd -optimize -simulate -cleanlib -top +In GUI mode, manually start the simulation. When you need to update the simulation run this commandline + + + +```bash +vcom *.vhd; restart -force; run -all +``` + +Here's also how to run the simulation in headless mode from a commandline (Do not run from Questa GUI, since it will make Questa quit) + +```bash +qrun $FILE_NAME -optimize -simulate -cleanlib -top $TOP_LEVEL_ENTITY ``` ## No objects appearing in modelsim/questa for testbenches @@ -38,3 +51,128 @@ Then select `Apply full visibility to all modules(full debug mode)` and press `O ## Dark mode in intel quartus Run this script I made on windows. [🔗Link](https://github.com/peter-tanner/Intel-Quartus-Dark-Mode-Windows) + +## Test 1 + +### Types + +- structual modelling => describe connections between entities using `port map` +- dataflow modelling => concurrent execution of statements + +```vhdl +A<=B; +C<=A; +... +``` + +- behavioral modelling => sequential execution + +### + +- Signals - signals are only mutated when the process finishes. +- Variables - variables are mutated at each statement in the process. + +### Evaluation of process manually + +- Double-check at end of first execution the sensitivity list to see if anything changes again + +### Delay + +Look at Expr evaluation value to decide if change should be rejected (not inputs) + +- Transport `O <= TRANSPORT Expr AFTER 10 ns;` +- Inertial `O <= REJECT 10 ns INERTIAL Expr AFTER 10 ns;` +- Inertial `O <= Expr AFTER 10 ns;` (Inertial delay: `10 ns`, same as transport component) +- Delta time `O <= Expr` (Implicit - delta time is applied to concurrent statements when a statement is dependent on the output of a previous one. Expressions which can be executed concurrently have the same delta time) + +Make table like this for delta time (required for followthrough marks): + +| Time | Event | Processes triggered | Transactions enqueued | Causes event? | +| ----- | ----- | ------------------- | --------------------- | ------------- | +| 5 ns | E->1 | U1 | 10ns:E->0 | Y | +| 10 ns | E->0 | U1 | 15ns:E->1 | Y | +| ... | ... | ... | ... | ... | + +### CHECKLIST + +- Check for statements where inputs are assigned to or outputs are read from + - Use signals instead +- Do not include data in sensitivity list for flip flops. +- Process: only use tokens with `sequential-statement` (`when` is not sequential) + +## Lab quick reference + +Tip: when using pin planner, you can copy paste multiple selections if you are using vscode multi cursors and copying from the markdown version of this page. Useful for filling out seven segment displays. + +| Key | Value | +| ----------------------------- | -------------- | +| Part number | 10M50DAF484C7G | +| 50 MHz signal (MAX10_CLK1_50) | PIN_P11 | +| SW0 | PIN_C10 | +| SW1 | PIN_C11 | +| SW2 | PIN_D12 | +| SW3 | PIN_C12 | +| SW4 | PIN_A12 | +| SW5 | PIN_B12 | +| SW6 | PIN_A13 | +| SW7 | PIN_A14 | +| SW8 | PIN_B14 | +| SW9 | PIN_F15 | +| LEDR0 | PIN_A8 | +| LEDR1 | PIN_A9 | +| LEDR2 | PIN_A10 | +| LEDR3 | PIN_B10 | +| LEDR4 | PIN_D13 | +| LEDR5 | PIN_C13 | +| LEDR6 | PIN_E14 | +| LEDR7 | PIN_D14 | +| LEDR8 | PIN_A11 | +| LEDR9 | PIN_B11 | +| HEX00 | PIN_C14 | +| HEX01 | PIN_E15 | +| HEX02 | PIN_C15 | +| HEX03 | PIN_C16 | +| HEX04 | PIN_E16 | +| HEX05 | PIN_D17 | +| HEX06 | PIN_C17 | +| HEX07 | PIN_D15 | +| HEX10 | PIN_C18 | +| HEX11 | PIN_D18 | +| HEX12 | PIN_E18 | +| HEX13 | PIN_B16 | +| HEX14 | PIN_A17 | +| HEX15 | PIN_A18 | +| HEX16 | PIN_B17 | +| HEX17 | PIN_A16 | +| HEX20 | PIN_B20 | +| HEX21 | PIN_A20 | +| HEX22 | PIN_B19 | +| HEX23 | PIN_A21 | +| HEX24 | PIN_B21 | +| HEX25 | PIN_C22 | +| HEX26 | PIN_B22 | +| HEX27 | PIN_A19 | +| HEX30 | PIN_F21 | +| HEX31 | PIN_E22 | +| HEX32 | PIN_E21 | +| HEX33 | PIN_C19 | +| HEX34 | PIN_C20 | +| HEX35 | PIN_D19 | +| HEX36 | PIN_E17 | +| HEX37 | PIN_D22 | +| HEX40 | PIN_F18 | +| HEX41 | PIN_E20 | +| HEX42 | PIN_E19 | +| HEX43 | PIN_J18 | +| HEX44 | PIN_H19 | +| HEX45 | PIN_F19 | +| HEX46 | PIN_F20 | +| HEX47 | PIN_F17 | +| HEX50 | PIN_J20 | +| HEX51 | PIN_K20 | +| HEX52 | PIN_L18 | +| HEX53 | PIN_N18 | +| HEX54 | PIN_M20 | +| HEX55 | PIN_N19 | +| HEX56 | PIN_N20 | +| HEX57 | PIN_L19 |