runHDLsim
The runHDLsim
function is a MATLAB script designed to simulate HDL (Hardware Description Language) files. It supports both Verilog (.v
) and VHDL (.vhdl
) files. The function verifies the existence of necessary tools (i.e., iverilog
, ghdl
, and gtkwave
) and runs the appropriate simulation.
Ensure that the following tools are installed on your system:
-
iverilog
(for Verilog simulation) -
ghdl
(for VHDL simulation) -
gtkwave
(for waveform viewing)
runHDLsim(module_path, testbench_path)
-
module_path
: Path to the HDL module file (either.v
for Verilog or.vhdl
for VHDL). -
testbench_path
: Path to the testbench file corresponding to the HDL module.
runHDLsim('path/to/module.v', 'path/to/testbench.v')
- File Verification: Checks if the specified module and testbench files exist.
-
Tool Check: Verifies the installation of required tools (
iverilog
for Verilog,ghdl
for VHDL, andgtkwave
for waveform viewing). -
Simulation:
-
For Verilog: Compiles the code using
iverilog
, runs the simulation withvvp
, and launchesgtkwave
to view the waveform. -
For VHDL: Analyzes and elaborates the design using
ghdl
, runs the simulation, and launchesgtkwave
to view the waveform.
-
For Verilog: Compiles the code using
- Ensure that the paths provided to the function are correct and that the files exist.
- If any required tool is not installed, the function will output an error message along with a download link.
The function includes error handling to:
- Notify if the specified files do not exist.
- Inform if any required tool is not installed and provide a download link.
This script is distributed under the GNU General Public License. See the included LICENSE file for more details.
For more information, refer to the respective tool documentation:
Cite As
Abhishek Kumar Singh (2024). runHDLsim (https://github.com/singham-hdl/runHDLing), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.1 | Updated README |
|
|
1.0.0 |
|