Skip to content

Instantly share code, notes, and snippets.

Last active Dec 30, 2015
What would you like to do?
initial begin
integer code;
reg [63:0] name;
reg [31:0] value;
code = $sscanf("reg1 = 0xc0ffee", "%s = 0x%h", name, value);
$display("code = %0d", code); // code = 2
$display("name = %0s", name); // name = reg1
$display("value = %h", value); // value = 00c0ffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment