OpenCores
URL https://opencores.org/ocsvn/tsv/tsv/trunk

Subversion Repositories tsv

[/] [tsv/] [trunk/] [test/] [T001.TSV] - Rev 6

Compare with Previous | Blame | View Log

module mkExample (Empty);
    //Reg#(Bit#(8)) r <- mkReg(?);    // don't-care is used for the
    //Reg#(Bit#(8)) r1<- mkReg(8'h33);
    //Reg#(Bit#(8)) r2<- mkReg(~0);
    rule every0(True );             // reset value of the Reg
        $display("value is %h", 0); // the value of r is displayed
        $display("value is %h", x); // the value of r is displayed
    endrule
    rule every1(True );             // reset value of the Reg
        $display("value is %h", 1, 2, x); // the value of r is displayed
    endrule
endmodule

module [M1] mkExample1 (Empty);
    rule every2;             // reset value of the Reg
        $display("OK?");
    endrule
endmodule

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.