Forum Discussion

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

compare binary digit in Nios II

Hello, im new in altera Nios II, im doing a Plamprint Identification system based on NIOS II, in my part is using nios ii to comparing reference data and input data.

We are using a TRDB_D5M digital camera and DE1 board for doing this project. The camera will capture a first picture and store in to the DE1 SDRAM. and so on the second picture.

My friend will convert the two picture in to the binary digit and store in SDRAM or flash memory. i have to compare the the two binary digit to show is it same or not.

After I did the SOPC builder in Quartus II, and then go to Nios II.

Let said I had

ref.txt file in SDRAM/flash memory, the content inside is 0000 0000

input.txt file in SDRAM, the content inside is 1111 1111

How do i use c programming in Nios II to implement this comparing data ??

#include <stdio.h># include <unistd.h>
Int main()
{
    int ref;     //how do I call the file in the SDRAM or flash memory ??
    int input;
    While(1)
    {
        If ( ref != input )
        {
            Printf (“\n fail”);
        else
            Printf(“\n access “);
        }
    }
Return(0);
}

2 Replies

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

    The SDRAM stores bytes, not files!

    Talk to you collegue to find out what he is using to identify the separate images.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    THANKS for your reply dsl..!

    after we bought the TRDB_D5M digital camera, their have provide a verilog DHL code (.sof), after we programe this .sof using quartus II programmer into the DE1 board, the camera will capture the image after a button pressed, and the image will store to SDRAM.

    so is it possible to read the image using Nios II ?? using printf() will do ?