UCLONG / NetEmulation

Software Simulation and Hardware Synthesis of Electrical and Optical Interconnection Networks
GNU General Public License v3.0
9 stars 6 forks source link

NetEmulation and the modulus operator #12

Closed DannyNicholls closed 10 years ago

DannyNicholls commented 10 years ago

I have been trying to use the old NetEmulation code to test my network. I have it running, and it compiles my work. But, whilst running, I get a recurring error with the modulus operator in ENoC_Network.

ERROR: Modulus operator invalid for REAL

and it repeats like crazy. It doesn't crash the test and I still send and receive packets. But most get dropped as the network relies on the modulus operator to determine network connections.

Any idea why the modulus operator is not working with the test? It worked with my previous network? Is this particular to NetEmulation?

I have uploaded my latest files so you can try it.

pmwatts commented 10 years ago

Can you give an example of the code where the errors are occurring? is it in a static assignment (mod evaluated at start to set up connections between routers) or dynamically for each packet?

Is it in simulation or synthesis? In general anything related to division is difficult in hardware (except for powers of 2 which is just a shift)

Phil


From: Danny Nicholls notifications@github.com Sent: 21 February 2014 00:46 To: DannyNicholls/NetEmulation Subject: [NetEmulation] NetEmulation and the modulus operator (#12)

I have been trying to use the old NetEmulation code to test my network. I have it running, and it compiles my work. But, whilst running, I get a recurring error with the modulus operator in ENoC_Network.

'ERROR: Modulus operator invalid for REAL'

and it repeats like crazy. It doesn't crash the test and I still send and receive packets. But most get dropped as the network relies on the modulus operator to determine network connections.

Any idea why the modulus operator is not working with the test? It worked with my previous network? Is this particular to NetEmulation?

Reply to this email directly or view it on GitHubhttps://github.com/DannyNicholls/NetEmulation/issues/12.

DannyNicholls commented 10 years ago

Thanks for answering Phil! I don't mean to harass you, I guess you get all these posts in your inbox as well as us three!

I managed to fix it this morning by specifically declaring my parameters as integers. It is probably good practice to explicitly declare parameters anyway.

From first look the electrical network appears to be working fine (pkt_count_rx = pkt_count_tx).

And it synthesises using an ARIA at approx 120 MHz for a single cycle router.

I'm meeting with Boris on tuesday to run his tester on the network.