1
1
# basic_verilog
2
2
### Some basic must-have verilog modules
3
3
4
-
5
4
(licensed under CC BY-SA 4_0)
6
5
7
-
8
6
Author: Konstantin Pavlov, pavlovconst@gmail.com
9
7
10
-
11
8
### CONTENTS:
12
9
13
10
* ** /Advanced Synthesis Cookbook/** - useful code from Altera's cookbook
@@ -16,40 +13,55 @@ Author: Konstantin Pavlov, pavlovconst@gmail.com
16
13
17
14
18
15
* ** /scripts/** - useful TCL scripts
19
- * ** /scripts/compile.tcl** - Modelsim no-project-mode compile script
20
- * ** /scripts/quartus_custom_report.tcl** - custom reporting or report analisys for Intel Quartus IDE
16
+ * ** /scripts/allow_undefined_ports.tcl** - allows generation of test projects with undefined pins for Vivado IDE
17
+ * ** /scripts/compile_quartus.tcl** - boilerplate script for commandline project compilation in Quartus IDE
18
+ * ** /scripts/convert_sof_to_jam.bat** - Altera/Intel FPGA configuration file converter
19
+ * ** /scripts/convert_sof_to_rbf.bat** - another Altera/Intel FPGA configuration file converter
20
+ * ** /scripts/iverilog_compile.tcl** - complete script to compile Verilog sources with iverilog tool and run simulation in gtkwave tool
21
+ * ** /scripts/modelsim_compile.tcl** - Modelsim no-project-mode compilation script
22
+ * ** /scripts/post_flow_quartus.tcl** - custom reporting or report analisys for Intel Quartus IDE
23
+ * ** /scripts/post_flow_vivado.tcl** - custom reporting or report analisys for Xilinx Vivado IDE
24
+ * ** /scripts/program_all.bat** - command line programmer example for Altera/Intel FPGAs
25
+ * ** /scripts/project_version_auto_increment.tcl** - project version autoincrement script for Quartus IDE
21
26
* ** /scripts/quartus_system_console_init.tcl** - initialization script for reading/writing Avalon-MM through JTAG-to-Avalon-MM bridge IP
27
+ * ** /scripts/set_project_directory.tcl** - changes current directory to match project directory in Vivado IDE
22
28
* ** /scripts/write_avalon_mm_from_file.tcl** - writing bulk binary data from binary file to Avalon-MM through JTAG-to-Avalon-MM bridge IP
23
29
24
30
25
31
* ** main_tb.sv** - basic testbench template
26
32
27
33
28
34
* ** ActionBurst** - multichannel one-shot triggering module
29
- * ** ActionBurst2** - multichannel one-shot triggering with variable steps module
35
+ * ** ActionBurst2** - multichannel one-shot triggering with variable steps
36
+ * ** adder_tree** - adding multiple values together in parallel
37
+ * ** bin2gray** - combinational Gray code to binary converter
30
38
* ** bin2pos** - converts binary coded value to positional (one-hot) code
31
39
* ** clk_divider** - wide reference clock divider
32
40
* ** debounce** - two-cycle debounce for input buttons
33
- * ** dynamic_delay** - dynamic delay for arbitrary input signal made on general-purpose trigger elements
34
- * ** edge_detect** - edge detector, gives one-tick pulses on every signal edge
41
+ * ** delay** - VERY USEFUL MODULE to make static delays or to synchronize across clock domains
42
+ * ** dynamic_delay** - dynamic delay for arbitrary input signal
43
+ * ** edge_detect** - combinational edge detector, gives one-tick pulses on every signal edge
35
44
* ** encoder** - digital encoder input logic module
36
45
* ** fifo** - single-clock FIFO buffer (queue) implementation
37
- * ** NDivide** - primitive integer divider
46
+ * ** gray2bin** - combinational binary to Gray code converter
47
+ * ** leave_one_hot** - combinational module that leaves only lowest hot bit
38
48
* ** lifo** - single-clock LIFO buffer (stack) implementation
39
- * ** leave_one_hot ** - leaves only lowest hot bit in vector
40
- * ** PulseGen ** - generates pulses with given width and delay
49
+ * ** NDivide ** - primitive integer divider
50
+ * ** pos2bin ** - converts positional (one-hot) value to binary representation
41
51
* ** pos2bin** - converts positional (one-hot) value to binary representation
52
+ * ** prbs_gen_chk** - PRBS pattern generator or checker
53
+ * ** pulse_gen** - generates pulses with given width and delay
54
+ * ** pulse_stretch** - configurable pulse stretcher/extender module
42
55
* ** reset_set** - SR trigger variant w/o metastable state, set dominates here
56
+ * ** reverse_bytes** - reverses bytes order within multi-byte array
43
57
* ** reverse_vector** - reverses signal order within multi-bit bus
44
58
* ** set_reset** - SR trigger variant w/o metastable state, reset dominates here
45
59
* ** spi_master** - universal spi master module
46
- * ** delay** - static delay for arbitrary input signal made on Xilinx`s SRL16E primitives. Also serves as input synchronizer, a standard way to get rid of metastability issues
47
60
* ** UartRx** - straightforward yet simple UART receiver implementation for FPGA written in Verilog
48
61
* ** UartTx** - straightforward yet simple UART transmitter implementation for FPGA written in Verilog
49
62
* ** UartRxExtreme** - extreme minimal UART receiver implementation for FPGA written in Verilog
50
63
* ** UartTxExtreme** - extreme minimal UART transmitter implementation for FPGA written in Verilog
51
64
52
65
53
-
54
66
Also added testbenches for selected modules
55
67
0 commit comments