Forum Discussion

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

checksum hardware accelrator design example (How can I modify it for DE2 Board)

I want to use this example with DE2 board but DE2 board did not have DDR SDRAM

and this design is using DDR SDRAM can anybody guide me how i can get rid of this DDR SDRAM and use instead SDRAM or SRAM present on DE2 board !!

here is the link to design example from altera

altera.com/support/examples/nios2/exm-checksum-acc.html

waiting for some kind response !!

3 Replies

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

    Rip out the memory controller and add the one you want in. If you use a non-bursting memory then you might as well disable the burst options in the read master because you won't need them. This set of components doesn't care what memory you hook up to it (that's the point in using standard interfaces like Avalon MM and ST) so it should port fairly seamlessly.

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

    This example has some questionable content.

    Line 22:

    isr_flag better be declared volatile or with optimization on the code should fail.

    Line 135:

    buffer = (0xFF & rand()) % 256;  // random values between 0 and 255
    Only one of '& 0xFF' and '% 256' are needed. Neither are really necessary since the assignment is into an alt_u8 pointer but it may serve to remove a warning.

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

    Typically neither '& 0xff' nor '% 256' will remove the warning (about assigning to a narrower integral type), an explict '(unsigned char)' cast will, but the compiler is likely to generate an (or maybe another) unnecessary mask with 255.

    Although I usually compile with '-Wall -Wshadow -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Werror' I disable all the warnings about integer convertions. I really don't like casts!