All Projects → tymonx → Logic

tymonx / Logic

Licence: apache-2.0
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Logic

Riscv
RISC-V CPU Core (RV32IM)
Stars: ✭ 272 (+82.55%)
Mutual labels:  verilog, fpga, asic, verification
Cores
Various HDL (Verilog) IP Cores
Stars: ✭ 271 (+81.88%)
Mutual labels:  verilog, fpga, asic, rtl
Rggen
Code generation tool for configuration and status registers
Stars: ✭ 54 (-63.76%)
Mutual labels:  verilog, fpga, asic, rtl
Livehd
Live Hardware Development (LiveHD), a productive infrastructure for Synthesis and Simulation
Stars: ✭ 110 (-26.17%)
Mutual labels:  verilog, fpga, asic
blarney
Haskell library for hardware description
Stars: ✭ 81 (-45.64%)
Mutual labels:  fpga, rtl, verilog
Fake-SDcard
Imitate SDcard using FPGAs.
Stars: ✭ 26 (-82.55%)
Mutual labels:  fpga, rtl, verilog
Openlane
OpenLANE is an automated RTL to GDSII flow based on several components including OpenROAD, Yosys, Magic, Netgen, Fault and custom methodology scripts for design exploration and optimization.
Stars: ✭ 293 (+96.64%)
Mutual labels:  verilog, asic, rtl
Open Register Design Tool
Tool to generate register RTL, models, and docs using SystemRDL or JSpec input
Stars: ✭ 126 (-15.44%)
Mutual labels:  verilog, fpga, asic
Aes
Verilog implementation of the symmetric block cipher AES (Advanced Encryption Standard) as specified in NIST FIPS 197. This implementation supports 128 and 256 bit keys.
Stars: ✭ 131 (-12.08%)
Mutual labels:  verilog, fpga, asic
Spinalhdl
Scala based HDL
Stars: ✭ 696 (+367.11%)
Mutual labels:  verilog, fpga, rtl
Vunit
VUnit is a unit testing framework for VHDL/SystemVerilog
Stars: ✭ 438 (+193.96%)
Mutual labels:  fpga, asic, verification
Clash Compiler
Haskell to VHDL/Verilog/SystemVerilog compiler
Stars: ✭ 958 (+542.95%)
Mutual labels:  verilog, fpga, asic
VGChips
Video Game custom chips reverse-engineered from silicon
Stars: ✭ 86 (-42.28%)
Mutual labels:  asic, fpga, verilog
FPGA-USB-Device
FPGA-based USB-device controller to implement USB-CDC, USB-HID, etc.
Stars: ✭ 29 (-80.54%)
Mutual labels:  fpga, rtl, verilog
hwt
VHDL/Verilog/SystemC code generator, simulator API written in python/c++
Stars: ✭ 145 (-2.68%)
Mutual labels:  fpga, rtl, verilog
OpenLane
OpenLane is an automated RTL to GDSII flow based on several components including OpenROAD, Yosys, Magic, Netgen, Fault and custom methodology scripts for design exploration and optimization.
Stars: ✭ 548 (+267.79%)
Mutual labels:  asic, rtl, verilog
SpinalCrypto
SpinalHDL - Cryptography libraries
Stars: ✭ 36 (-75.84%)
Mutual labels:  fpga, rtl, verilog
Hard-JPEG-LS
FPGA-based JPEG-LS image compressor.
Stars: ✭ 52 (-65.1%)
Mutual labels:  fpga, rtl, verilog
Verilog
Repository for basic (and not so basic) Verilog blocks with high re-use potential
Stars: ✭ 296 (+98.66%)
Mutual labels:  verilog, fpga, rtl
Darkriscv
opensouce RISC-V cpu core implemented in Verilog from scratch in one night!
Stars: ✭ 1,062 (+612.75%)
Mutual labels:  verilog, fpga, rtl

Logic

Language Standard Language License Apache-2.0 Build Status Join the chat at https://gitter.im/tymonx/logic

CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.

Includes:

  • CMake utilities for rapid building and testing RTL projects
  • SystemVerilog modules for creating high quality RTL projects
  • Modern C++ framework for UVM with SystemC for creating high quality and performance efficient tests for RTL projects

Benefits

  • Quick setup
  • Cross platform, cross IDE
  • No need to create separate scripts for simulation and synthesis
  • No need to create separate scripts for different tools (Intel Quartus, Xilinx Vivado, Verilator, ModelSim, ...)
  • Supports incremental compilation, run slow vendor IP core regeneration and different simulation and synthesis tools only if input source file changes
  • Supports parallel compilation, run slow vendor IP core regeneration and different simulation and synthesis tools in parallel
  • Maintain the same file consistency between simulation and synthesis for different tools
  • Share the same HDL source code base and IP cores for various FPGA projects
  • Integration with Continuous Integration (CI) and Continuous Deployment (CD) like Jenkins, Hudson, GitLab, etc.
  • Run RTL unit tests under ctest: pass/fail, time execution, timeout, parallel execution, tests selection
  • Run the same unit tests with different parameters
  • Easy to integrate with other projects as git submodule
  • Custom UVM printers: JSON
  • Modern HDL testing library written in C++11 using UVM-SystemC
  • Support for Clang 3.5 and later
  • Support for GCC 4.9 and later

Documentation

Examples

FPGA projects that use Logic utilities for creating, building and testing:

  • Virtio - Virtio implementation

Requirements

These 3rd party tools and libraries are required. They must be installed to build logic library:

These 3rd party tools and libraries are optional. They must be installed to build and run tests:

  • Verilator - simulator, lint and coverage tool
  • GoogleTest - C++ unit test framework
  • SVUnit - SystemVerilog unit test framework

These 3rd party tools and libraries are optional:

Workspace

  • README.md - this read me file in MarkDown format
  • LICENSE - license file
  • CMakeLists.txt - CMake root script for building and testing project
  • doc - configuration files for code documentation generator
  • rtl - RTL source files
  • src - C++ source files
  • include - C++ include headers
  • tests - unit tests and verification tests in SystemC using Google Test or UVM and SystemVerilog using SVUnit
  • cmake - additional CMake scripts for building project
  • scripts - additional scripts in TCL or Python for building project

Build

Clone project repository:

git clone [email protected]:tymonx/logic.git

Change current location to project directory:

cd logic

Create build directory:

mkdir build

Change current location to build directory:

cd build

Create build scripts using CMake:

cmake ..

Build project using CMake (generic):

cmake --build . --target all

Or build project using make:

make -j`nproc`

It is much faster to recompile project using Ninja rather than Unix makefiles:

cmake -G Ninja ..
cmake --build . --target all

Documentation

To build documentation:

cmake --build . target doc

Built HTML documentation can be found in:

doc/html

To view HTML documentation, open it using web browser:

<WEB_BROWSER> doc/html/index.html

Tests

Run all unit tests:

ctest

Run only unit tests for AXI4-Stream:

ctest -R axi4_stream

Waveforms from unit tests run under ModelSim are stored in:

modelsim/unit_tests/<unit_test_name>

Waveforms from unit tests run under Verilator are stored in:

verilator/unit_tests/<unit_test_name>

All unit tests logs are stored in:

Testing/Temporary/LastTest.log

Verilator Coverage

Run Verilator coverage after running all tests:

cmake --build . --target verilator-coverage

Verilator analysis

Enable Verilator analysis:

add_hdl_source(<hdl-module-filename>
    ANALYSIS
        TRUE
)

Run Verilator analysis for <hdl-module-name>:

make verilator-analysis-<hdl-module-name>

Run Verilator analysis for all HDL modules:

make verilator-analysis-all

Creating Intel FPGA Quartus project

Use add_quartus_project() function to create Quartus project:

add_quartus_project(<top_level_entity>)

Quartus project will be created under:

quartus/<top_level_entity>

RTL analysis and elaboration in Intel FPGA Quartus for top level entity:

cmake --build . --target quartus-analysis-<top_level_entity>

RTL compilation in Intel FPGA Quartus for top level entity:

cmake --build . --target quartus-compile-<top_level_entity>

RTL analysis and elaboration in Intel FPGA Quartus for all top level entities:

cmake --build . --target quartus-analysis-all

RTL compilation in Intel FPGA Quartus for all top level entities:

cmake --build . --target quartus-compile-all

Creating Xilinx Vivado project

Use add_vivado_project() function to create Vivado project:

add_vivado_project(<top_level_entity>)

Vivado project will be created under:

vivado/<top_level_entity>

RTL analysis and elaboration in Xilinx Vivado for top level entity:

cmake --build . --target vivado-analysis-<top_level_entity>

Using with other CMake projects

Change current location to another RTL project root directory:

cd <rtl_project_root_directory>

Clone and add logic repository to RTL project as git submodule:

git submodule add [email protected]:tymonx/logic.git

Add these lines to CMakeLists.txt root file:

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
    ${CMAKE_CURRENT_LIST_DIR}/logic/cmake
)

include(AddLogic)

enable_testing()

add_subdirectory(logic)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].