Skip to content

Commit

Permalink
Tidy up examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarawneh committed Jun 18, 2018
1 parent d02a29f commit 28cb3c6
Show file tree
Hide file tree
Showing 76 changed files with 1,198 additions and 1,823 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions benchmarks/counter/counter-4-stages.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

module Untitled(ri, ro, ai, ao);

input ri, ao;
output ro, ai;

// Stage 0

AOI2BB2 U0_0 (.ON(ai), .A1N(ao_0), .A2N(U2_ON_0), .B1(ao_0), .B2(ri));
AOI2BB2 U1_0 (.ON(ro_0), .A1N(ri), .A2N(U2_ON_0), .B1(ri), .B2(U2_ON_0));
AOI2BB2 U2_0 (.ON(U2_ON_0), .A1N(ao_0), .A2N(U2_ON_0), .B1(ao_0), .B2(ai));

// Stage 1

AOI2BB2 U0_1 (.ON(ai_1), .A1N(ao_1), .A2N(U2_ON_1), .B1(ao_1), .B2(ri_1));
AOI2BB2 U1_1 (.ON(ro_1), .A1N(ri_1), .A2N(U2_ON_1), .B1(ri_1), .B2(U2_ON_1));
AOI2BB2 U2_1 (.ON(U2_ON_1), .A1N(ao_1), .A2N(U2_ON_1), .B1(ao_1), .B2(ai_1));

// Stage 2

AOI2BB2 U0_2 (.ON(ai_2), .A1N(ao_2), .A2N(U2_ON_2), .B1(ao_2), .B2(ri_2));
AOI2BB2 U1_2 (.ON(ro_2), .A1N(ri_2), .A2N(U2_ON_2), .B1(ri_2), .B2(U2_ON_2));
AOI2BB2 U2_2 (.ON(U2_ON_2), .A1N(ao_2), .A2N(U2_ON_2), .B1(ao_2), .B2(ai_2));

// Stage 3

AOI2BB2 U0_3 (.ON(ai_3), .A1N(ao), .A2N(U2_ON_3), .B1(ao), .B2(ri_3));
AOI2BB2 U1_3 (.ON(ro), .A1N(ri_3), .A2N(U2_ON_3), .B1(ri_3), .B2(U2_ON_3));
AOI2BB2 U2_3 (.ON(U2_ON_3), .A1N(ao), .A2N(U2_ON_3), .B1(ao), .B2(ai_3));

BUF ao_0_buf (.O(ao_0), .I(ai_1)); // stage 0 <- stage 1
BUF ri_1_buf (.O(ri_1), .I(ro_0)); // stage 0 -> stage 1

BUF ao_1_buf (.O(ao_1), .I(ai_2)); // stage 1 <- stage 2
BUF ri_2_buf (.O(ri_2), .I(ro_1)); // stage 1 -> stage 2

BUF ao_2_buf (.O(ao_2), .I(ai_3)); // stage 2 <- stage 3
BUF ri_3_buf (.O(ri_3), .I(ro_2)); // stage 2 -> stage 3

// signal values at the initial state:
// !ai !ro_0 !U2_ON_0 !ao_0 !ri !ai_1 !ro_1 !U2_ON_1 !ao_1 !ri_1 !ai_2 !ro_2 !U2_ON_2 !ao_2 !ri_2 !ai_3 !ro !U2_ON_3 !ao !ri_3

endmodule

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added benchmarks/counter/spec4-stg.work
Binary file not shown.
75 changes: 75 additions & 0 deletions benchmarks/counter/spec4.sg
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# SG file
.model Untitled
.outputs ai ro
.inputs ri ao
.state graph
s0 ri+ s1
s1 ro+ s2
s2 ao+ s3
s3 ro- s4
s4 ao- s5
s5 ro+ s6
s6 ao+ s7
s7 ro- s8
s8 ao- s9
s9 ro+ s10
s10 ao+ s11
s11 ro- s12
s12 ao- s13
s13 ro+ s14
s14 ao+ s15
s15 ro- s16
s16 ao- s17
s17 ro+ s18
s18 ao+ s19
s19 ro- s20
s20 ao- s21
s21 ro+ s22
s22 ao+ s23
s23 ro- s24
s24 ao- s25
s25 ro+ s26
s26 ao+ s27
s27 ro- s28
s28 ao- s29
s29 ro+ s30
s30 ao+ s31
s31 ro- s32
s32 ao- s33
s33 ai+ s34
s34 ri- s35
s35 ro+ s36
s36 ao+ s37
s37 ro- s38
s38 ao- s39
s39 ro+ s40
s40 ao+ s41
s41 ro- s42
s42 ao- s43
s43 ro+ s44
s44 ao+ s45
s45 ro- s46
s46 ao- s47
s47 ro+ s48
s48 ao+ s49
s49 ro- s50
s50 ao- s51
s51 ro+ s52
s52 ao+ s53
s53 ro- s54
s54 ao- s55
s55 ro+ s56
s56 ao+ s57
s57 ro- s58
s58 ao- s59
s59 ro+ s60
s60 ao+ s61
s61 ro- s62
s62 ao- s63
s63 ro+ s64
s64 ao+ s65
s65 ro- s66
s66 ao- s67
s67 ai- s0
.marking {s0}
.end
Binary file added benchmarks/counter/spec6-stg.work
Binary file not shown.
Binary file added benchmarks/counter/spec8-stg.work
Binary file not shown.
Loading

0 comments on commit 28cb3c6

Please sign in to comment.