All Projects → tinyfpga → yahdl

tinyfpga / yahdl

Licence: BSD-3-Clause license
A programming language for FPGAs.

Programming Languages

java
68154 projects - #9 most used programming language
ANTLR
299 projects

Projects that are alternatives of or similar to yahdl

Openwifi Hw
FPGA/hardware design of openwifi
Stars: ✭ 181 (+805%)
Mutual labels:  fpga, verilog
Convolution network on fpga
CNN acceleration on virtex-7 FPGA with verilog HDL
Stars: ✭ 236 (+1080%)
Mutual labels:  fpga, verilog
Verilog Generator Of Neural Net Digit Detector For Fpga
Verilog Generator of Neural Net Digit Detector for FPGA
Stars: ✭ 187 (+835%)
Mutual labels:  fpga, verilog
FPGA ThreeLevelStorage
【原创,已被编入官方教材】Three-level storage subsystem(SD+DDR2 SDRAM+Cache), based on Nexys4 FPGA board. 同济大学计算机系统结构课程设计,FPGA三级存储子系统。
Stars: ✭ 86 (+330%)
Mutual labels:  fpga, verilog
kianRiscV
KianRISC-V! No RISC-V, no fun! RISC-V CPU with strong design rules and unittested! CPU you can trust! kianv rv32im risc-v a hdmi soc with harris computer architecture in verilog: multicycle, singlecycle and 5-stage pipelining Processor. Multicycle Soc with firmware that runs raytracer, mandelbrot, 3d hdmi gfx, dma controller, etc.....
Stars: ✭ 167 (+735%)
Mutual labels:  fpga, verilog
Fpga Chip8
CHIP-8 console on FPGA
Stars: ✭ 169 (+745%)
Mutual labels:  fpga, verilog
Biriscv
32-bit Superscalar RISC-V CPU
Stars: ✭ 208 (+940%)
Mutual labels:  fpga, verilog
Logic
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.
Stars: ✭ 149 (+645%)
Mutual labels:  fpga, verilog
SpinalDev
Docker Development Environment for SpinalHDL
Stars: ✭ 17 (-15%)
Mutual labels:  fpga, verilog
fpga-docker
Tools for running FPGA vendor toolchains with Docker
Stars: ✭ 54 (+170%)
Mutual labels:  fpga, verilog
vscode-terosHDL
VHDL and Verilog/SV IDE: state machine viewer, linter, documentation, snippets... and more!
Stars: ✭ 325 (+1525%)
Mutual labels:  fpga, verilog
xeda
Cross EDA Abstraction and Automation
Stars: ✭ 25 (+25%)
Mutual labels:  fpga, verilog
Fpga readings
Recipe for FPGA cooking
Stars: ✭ 164 (+720%)
Mutual labels:  fpga, verilog
Wb2axip
Bus bridges and other odds and ends
Stars: ✭ 177 (+785%)
Mutual labels:  fpga, verilog
Tinytpu
Implementation of a Tensor Processing Unit for embedded systems and the IoT.
Stars: ✭ 153 (+665%)
Mutual labels:  fpga, verilog
Red Pitaya Notes
Notes on the Red Pitaya Open Source Instrument
Stars: ✭ 205 (+925%)
Mutual labels:  fpga, verilog
Openfpgaduino
All open source file and project for OpenFPGAduino project
Stars: ✭ 137 (+585%)
Mutual labels:  fpga, verilog
Openwifi
open-source IEEE 802.11 WiFi baseband FPGA (chip) design
Stars: ✭ 2,257 (+11185%)
Mutual labels:  fpga, verilog
Basic verilog
Must-have verilog systemverilog modules
Stars: ✭ 247 (+1135%)
Mutual labels:  fpga, verilog
vga-clock
Show the time on a VGA monitor. Submitted for the Google MPW1 ASIC shuttle.
Stars: ✭ 48 (+140%)
Mutual labels:  fpga, verilog

yahdl

Yet Another Hardware Description Language.

Objective

To provide a familiar and productive language for makers and hobbyists to develop applications on FPGAs.

Guiding Principals

These principals are used to guide design and development of the language, tools, and ecosystem.

  1. Make it easy to use and understand.
  2. Make it easy to write reusable libraries. Make it easy to use reusable libraries.
  3. Provide a clear path from "easy but unoptimized" to "optimized but difficult".
  4. Prefer the most widely recognizable syntax, structure, and patterns over cutting-edge or exotic alternatives.
  5. Prefer low-level library functions over built-in language features.
  6. Avoid high-level synthesis.

Language Design Summary

The core language borrows heavily from both Verilog and C++. Most Verilog concepts translate directly into yahdl concepts but with a syntax that looks more like C++. Verilog modules, parameters, ports, nets, always blocks, and assign statements all have direct representations in yahdl. New concepts of synthesizable threads, function calls, and classes are added. Threads and sequential functions are transformed into control and datapath logic.

Language Design

Packages

Data Types

Time

Literals

Logic Vectors

Arrays

Classes

Structural Elements

Modules

Nets

Operators

Select

Postfix Increment and Decrement

Prefix Increment and Decrement

Logical Reduction

Unary Plus and Minus

Concatenation

Replication

Multiplication, Division, and Modulus

Addition and Subtraction

Shift Operators

Relational Operators

Bitwise Operators

Logical Operators

Conditional Operator

Assignment Operators

If-Else Statements

Switch Statement

For Loop

While Loop

Functions

Modules

Classes

Compiler Design

Parser

Tokenize and parse the design files into concrete syntax trees.

Abstract Syntax Tree Generation

Convert the concrete syntax trees into abstract syntax trees. An AST (abstract syntax tree) is more suitable for further processing.

Symbol Table Generation

The symbol table for each scope is generated. The complete symbol table is actually a tree of tables where each node represents a scope.

Symbol Resolution

Every reference to a symbol is resolved to the definition of that symbol.

Elaboration

Starting at the top module going down the hierarchy, modules are copied to each location they are instantiated.

Constant and Parameter Propagation and Evaluation

Starting at the top module going down the hierarchy, parameter and constant expressions are evaluated and propagated.

Expression Simplification

Expressions are simplified.

Control Graph Extraction

The control flow for each method and thread is extracted. Assignments and expressions are included in

Datapath Graph Extraction

The data flow from each control graph is extracted with signals connecting the control graph to the data graph control points. Temporary storage and muxes are added as necessary.

Dead Code Elimination

Dead code is pruned from the control graph and data graph based on expressions known at compile-time.

Simple State Fusion

Combine independent and trivially dependent statement nodes into a single node. Trivially dependent statements are dependent assignment expressions comprised of a small number of logical functions, unlimited constant bitslicing, unlimited constant shifts, and variable references.

Call Graph Generation

Beginning from each always block and thread, a directed graph is generated that describes every location that every function is called from.

Trivial Function Inline

Trival getter and setter functions are inlined.

Arbiter Insertion

Arbiters are inserted for functions that are called from more than one thread and for module fields that are updated from more than one always block or thread.

Control and Datapath Graph Optimization

When implementing the design, there are many implementation decisions to be made along the way. Simple decisions like whether a function should be inlined or not can make a big difference in performance and resource utilization.

Optimization stages must implement three features:

  1. Identify locations to perform the optimization.
  2. Heuristics to get cheap decisions on whether the optimization should be performed when it is obvious what to do.
  3. Perform the optimization.

Possible implementation optimizations:

  • Loop Unrolling
  • Function Inline
  • Complex State Fusion

Verilog Output

Output the design in human-readable and synthesizable verilog.

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].