basic.vl
575 B
edit1: instead of manually assigning clk, i used always with a delay of 5 ns to oscillate the clk.
note: flip flops can be made by using an always block. This is recommended, as well as FSMs. Use non blocking assignments for sequential circuits (eg flip flop), and blocking assignments for combinational circuits. The code above is just an experiment.
note: flip flops can be made by using an always block. This is recommended, as well as FSMs. Use non blocking assignments for sequential circuits (eg flip flop), and blocking assignments for combinational circuits. The code above is just an experiment.
doing this in verilog is like programming in C but there is no C code, just a bunch of assembly inside an asm keyword lol.
All this code can be replaced by a
{cout, s} = a + b + cin;
All this code can be replaced by a
{cout, s} = a + b + cin;
p.file
doing this in verilog is like programming in C but there is no C code, just a bunch of assembly inside an asm keyword lol. All this code can be replaced by a {cout, s} = a + b + cin;
Topics: Logic Design Arithmetic. #hardware #comp_arch
Advanced Arithmetic Techniques, how do computers actually do arithmetic?
https://www.quadibloc.com/comp/cp0202.htm
Advanced Arithmetic Techniques, how do computers actually do arithmetic?
https://www.quadibloc.com/comp/cp0202.htm
p.file
Topics: Logic Design Arithmetic. #hardware #comp_arch Advanced Arithmetic Techniques, how do computers actually do arithmetic? https://www.quadibloc.com/comp/cp0202.htm
I manually implemented a 32 bit binary multiplier using full adders, it is a messy code (even because there is no multidimensional arrays in verilog) but it worked. Again, you can just use 'assign y = a * b;'.
multipliers can be implemented using wallace trees or dadda trees too, or a sequential circuit with shifters.
Forwarded from Sci-Hub
townsend2003.pdf
624.3 KB
Townsend, W. J., Swartzlander, Jr., E. E., & Abraham, J. A. (2003). A comparison of Dadda and Wallace multiplier delays. Advanced Signal Processing Algorithms, Architectures, and Implementations XIII. doi:10.1117/12.507012
#assembly #comp_arch #learning
MIPS Assembly/Resources.
https://en.m.wikibooks.org/wiki/MIPS_Assembly/Resources
MIPS Assembly/Resources.
https://en.m.wikibooks.org/wiki/MIPS_Assembly/Resources
Topics: C C++ Performance Optimization. #c #cpp #learning
A curated list of awesome C/C++ performance optimization resources: talks, articles, books, libraries, tools, sites, blogs.
https://github.com/fenbf/AwesomePerfCpp
A curated list of awesome C/C++ performance optimization resources: talks, articles, books, libraries, tools, sites, blogs.
https://github.com/fenbf/AwesomePerfCpp
GitHub
GitHub - fenbf/AwesomePerfCpp: A curated list of awesome C/C++ performance optimization resources: talks, articles, books, libraries…
A curated list of awesome C/C++ performance optimization resources: talks, articles, books, libraries, tools, sites, blogs. Inspired by awesome. - fenbf/AwesomePerfCpp