Skip to content

Commit

Permalink
reverting simple to working state
Browse files Browse the repository at this point in the history
  • Loading branch information
sangwoojun committed Mar 5, 2022
1 parent 0c69014 commit b0ba184
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 0 additions & 9 deletions examples/simple/HwMain.bsv
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ module mkHwMain#(PcieUserIfc pcie)
let a = w.addr;
let d = w.data;

if ( a == 0 )
payload <= 0;
else if ( a == 4 )
payload |= zeroExtend(d)<<32;
else
zeroExtend(d)
auroraExt.ports[portid].send(payload|zeroExtend(d));


if ( a == 0 ) begin // command
end else if ( a == 4 ) begin // data load
for ( Integer i = 1; i < 15; i=i+1 ) begin
Expand Down
6 changes: 6 additions & 0 deletions examples/simple/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ int main(int argc, char** argv) {
printf( "Magic: %x\n", d );
fflush(stdout);

pcie->userWriteWord(4, 0xdeadbeef);
pcie->userWriteWord(0, 0xcafef00d);

pcie->userWriteWord(12, 0);
pcie->Ioctl(1,0); // refresh link
sleep(1);
for ( int i = 0; i < 8; i++ ) {
printf( "read: %x\n", pcie->userReadWord(i*4) );
//sleep(1);
Expand Down

0 comments on commit b0ba184

Please sign in to comment.