Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azonenberg/yosys
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e0386d04f533
Choose a base ref
...
head repository: azonenberg/yosys
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dca3b3cd5f81
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on May 17, 2017

  1. Copy the full SHA
    2122ae6 View commit details

Commits on May 23, 2017

  1. Copy the full SHA
    664ba4d View commit details
  2. Add examples/osu035

    cliffordwolf committed May 23, 2017
    Copy the full SHA
    dca3b3c View commit details
Showing with 33 additions and 1 deletion.
  1. +3 −1 backends/simplec/simplec.cc
  2. +3 −0 examples/osu035/.gitignore
  3. +13 −0 examples/osu035/Makefile
  4. +3 −0 examples/osu035/example.v
  5. +11 −0 examples/osu035/example.ys
4 changes: 3 additions & 1 deletion backends/simplec/simplec.cc
Original file line number Diff line number Diff line change
@@ -482,7 +482,9 @@ struct SimplecWorker
string a_expr = a.wire ? util_get_bit(work->prefix + cid(a.wire->name), a.wire->width, a.offset) : a.data ? "1" : "0";
string b_expr = b.wire ? util_get_bit(work->prefix + cid(b.wire->name), b.wire->width, b.offset) : b.data ? "1" : "0";
string s_expr = s.wire ? util_get_bit(work->prefix + cid(s.wire->name), s.wire->width, s.offset) : s.data ? "1" : "0";
string expr = stringf("%s ? %s : %s", s_expr.c_str(), b_expr.c_str(), a_expr.c_str());

// casts to bool are a workaround for CBMC bug (https://github.com/diffblue/cbmc/issues/933)
string expr = stringf("%s ? (bool)%s : (bool)%s", s_expr.c_str(), b_expr.c_str(), a_expr.c_str());

log_assert(y.wire);
funct_declarations.push_back(util_set_bit(work->prefix + cid(y.wire->name), y.wire->width, y.offset, expr) +
3 changes: 3 additions & 0 deletions examples/osu035/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
osu035_stdcells.lib
example.yslog
example.edif
13 changes: 13 additions & 0 deletions examples/osu035/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

example.edif: example.ys example.v osu035_stdcells.lib
yosys -l example.yslog -q example.ys

osu035_stdcells.lib:
rm -f osu035_stdcells.lib.part osu035_stdcells.lib
wget -O osu035_stdcells.lib.part https://vlsiarch.ecen.okstate.edu/flows/MOSIS_SCMOS/latest/cadence/lib/ami035/signalstorm/osu035_stdcells.lib
mv osu035_stdcells.lib.part osu035_stdcells.lib

clean:
rm -f osu035_stdcells.lib
rm -f example.yslog example.edif

3 changes: 3 additions & 0 deletions examples/osu035/example.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module top (input clk, input [7:0] a, b, output reg [15:0] c);
always @(posedge clk) c <= a * b;
endmodule
11 changes: 11 additions & 0 deletions examples/osu035/example.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
read_verilog example.v
read_liberty -lib osu035_stdcells.lib

synth -top top

dfflibmap -liberty osu035_stdcells.lib
abc -liberty osu035_stdcells.lib
opt_clean

stat -liberty osu035_stdcells.lib
write_edif example.edif