09.08.2013 Views

Bluespec: Why chip design can't be left EE's - MIT

Bluespec: Why chip design can't be left EE's - MIT

Bluespec: Why chip design can't be left EE's - MIT

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GCD in <strong>Bluespec</strong><br />

module mkGCD (GCD);<br />

Reg#(int) x; Reg#(int) y;<br />

x = mkReg(_); y = mkReg(0);<br />

endmodule;<br />

State<br />

rule ((x > y) && (y != 0)) <strong>be</strong>gin x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!