Giter Club home page Giter Club logo

instrumented_adder's Introduction

Measuring the speed of optimised hardware adders

Teo's work (see below) gives us 4 options for hardware adder to use for ASIC and FPGA design.

hardware adders

The results in the table above are calculated by the OpenLane ASIC flow. We want to put these designs on the next free Google shuttle to validate the timings.

Aim of this project

  • Characterise each type of adder, along with the standard Yosys adder
  • Build a way of measuring the performance close to the adder. We don't want to do it off the chip, as this will run into the same difficulties faced by Andrew Zonenberg when he tried to characterise OpenRAM.
  • Some additional requirements:
    • Adder can't glitch while adding the 2 inputs because this could either violate timing or mess up the ring oscillator
    • We want to choose which paths through the adder, to be able to compare the simulation against the actual results
    • Measure how good our CAD environment is - did the prediction match the measurement?

More about hardware adders

Block diagram

The basic idea is to have a ring oscillator with 3 modes:

  • Bypass - just the ring oscillating
  • Control - add 4 additional inverters to help characterise the ring
  • Adder - put one bit of the adder into the ring

In this way we can first measure the ring period, then see how it changes for each bit of the adders.

instrumented adder

The netnames, inputs and outputs in this diagram (should) match the Verilog source.

Digital simulation

trace

Trace shows the results of running the cocotb test.

  • test_bypass_minimal
  • test_adder_minimal
  • test_bypass
  • test_control
  • test_adder_in_loop
  • test_adder

To run the digital sim, type make test_adder

Analog simulations

Shows the stop_b and ring_osc_out traces. These traces are to get an idea on the frequency of the ring oscillator loop with and without the adder.

The following show just for the behavioral adder. To check the other adders, look in the spice directory.

Bypass loop - fastest

control

run make analog_bypass

Control loop - adds 4 more inverters to the ring osc

control

run make analog_control

Adder loop - slowest

control

run make analog_adder

Hardening with OpenLane (and create spice files)

  • Uncomment the adder you want in src/instrumented_adder.v
  • Run make spice/instrumented_adder.spice to harden with OpenLane and copy spice file

adder gds

Prerequisites

  • Install the adder library with make install_adder
  • Build the source for the adders with make all_adders

TODO (PRs welcome!)

Log of work in progress.

  • how to keep the inverter loop - done
  • check timing - looks good
  • results still not quite making sense (see the log)
  • remove ring_osc_out output to avoid loading the ring
  • get STA report for ring_osc_counter
  • define number of inverters in the loop
  • check process corners
  • update counter registers to 32b
  • put inside group project wrapper
  • caravel test

Zero to ASIC Course

This project was made as part of the Zero to ASIC Course!

License

This project is licensed under Apache 2

instrumented_adder's People

Contributors

erikvanzijst avatar jix avatar mattvenn avatar tdene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tdene ericsmi jix

instrumented_adder's Issues

Do analog simulation of the adder and ring oscillator together (potentially with BigSpicy?)

It would be awesome to do analog simulation of the complete circuit with the adder included!

Maybe https://github.com/google/bigspicy could help here?

bigspicy is a tool for merging circuit descriptions (netlists), generating Spice decks modeling those circuits, generating Spice tests to measure those models, and analyzing the results of running Spice on those tests.

bigspicy allows you to combine structural Verilog from a PDK, Spice models of standard cells, a structural Verilog model of some circuit implemented in that PDK, and parasitics extracted into SPEF format. You can then reason about the electrical structure of the design however you want.

bigspicy generates Spice decks in Xyce format, though this can (and should) be extended to other Spice dialects. (That is why we recommend setting up Xyce below.)

Would be great to see this taped out on GF180MCU process technology

Google just announced that there will be no cost shuttles on the GF180MCU process technology (https://opensource.googleblog.com/2022/10/announcing-globalfoundries-open-mpw-shuttle-program.html). It would be awesome to get the design taped out on GF180MCU too. Then you can compare the achieved performance on SKY130 to GF180MCU!

It would be even more awesome if you did it with the provided standard cells and @stineje new standard cells!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.