Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

Can't get the proper data from custom component through IORD(from io.h file) macro.

Hello,

I have designed a MM slave component which includes 2 conduit interface and a 8 bit register and I want to read data from that register but some how I can't get the data.

The simulation is done by using ModelSim.

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have simulate the design using modelsim and i get the read data but i think it is a garbage value. every time i got the new value and even the read signal didn't set to logic level "1" during the operation.

    So, what should I do to resolved this problem.

    I have used just simple 'i = IORD_32DIRECT(BASE, 0x00)" macro where 'i' is the integer variable.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Do you have a known, fixed value in the register map of your slave that you can look for? Then you'd know if it was garbage or not.

    Cheers,

    Alex
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yeah I got the garbage value but at the same time the read signal should goes to higher level (logic 1) but it didn't.

    and after writing some data to that component i got both the wire pulse and well as read pulse so what should I do if I want only read operation.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The 'IORD' command is all you need if you only want a read operation. How are you checking that the read signal doesn't go high? SignalTap? or with an oscilloscope with read taken to an external pin?

    You're going to have to post much more of your project's code if we're to help with this. How is your Nios connected to your slave?

    Cheers,

    Alex