Verilog in a NutShell
Modulo Scheduling In HLS (Loop Pipeline Synthesize)
Modulo Scheduling In HLS (Loop Pipeline synthesis)
Instruction Scheduling Introduction
Instruction Scheduling can be broken into three categories: Local Scheduling, Global Scheduling, and Cyclic Scheduling:
- Local Scheduling handles single basic blocks which are regions of straight line code that have a single entry and exit (List scheduling).
- Global Scheduling can handle multiple basic blocks with acyclic control flow (Trace Scheduling, Superblock Scheduling, Hyperblock Scheduling).
- Cyclic Scheduling handles single or multiple basic blocks with cyclic control flow. (Modulo Scheduling)
There exist many Global Scheduling algorithms that can also be used in cyclic scheduling
- Trace Scheduling It identifies frequently executed traces in the program and treats the path as an extended basic block which is scheduled using a list scheduling approach.
- Superblock Scheduling Superblocks are a subset of traces which have a single entry and multiple exit attributes (therefore they are traces without side exits). List scheduling is typically used to schedule the superblock.
- Hyperblock Scheduling Excessive control flow can complicate scheduling, so this approach uses a technique called If-Conversion to remove conditional branches.
LLVM IR Tutorial
LLVM IR notes
Basic constructs
Global variable
int variable = 21;
@variable = global i32 21
Globals are prefixed with the @
character. You can see that also functions, such as main
, are also global variables in LLVM. LLVM views global variables as pointers; so you must explicitly dereference the global variable using the load
instruction when accessing its value, likewise you must explicitly store the value of a global variable using the store
instruction.
Lpsolve tutorial (Linear Programming Solver)
Lpsolve tutorial
Problem formulation
Suppose a farmer has 75 acres on which to plant two crops: wheat and barley. To produce these crops, it costs the farmer (for seed, fertilizer, etc.) $120 per acre for the wheat and $210 per acre for the barley. The farmer has $15000 available for expenses. But after the harvest, the farmer must store the crops while awaiting favourable market conditions. The farmer has storage space for 4000 bushels. Each acre yields an average of 110 bushels of wheat or 30 bushels of barley. If the net profit per bushel of wheat (after all expenses have been subtracted) is $1.30 and for barley is $2.00, how should the farmer plant the 75 acres to maximize profit?
Mathmatically, we can formulate this as :
Maximize P = (110)(1.30)x + (30)(2.00)y = 143x + 60y
s.t.
120x + 210y <= 15000
110x + 30y <= 4000
x + y <= 75
x >= 0, y >= 0
Datapath synthesize in Verilog
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.