Forum Discussion

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

have warning component is not supported ?

I made simple system in SOPC (nios II core, On chip SRAM memory, + PIO (8 IO ports) I generated system and in nios II IDE crated new procect with hello word example C code I changed this C code to simple code that writes to PIO periphery to toggle IO pins I build project and whent to Instruction set simulatior and then run debugger got sutch Warning mesage:

Warning : SOPC Builder system component pio_0 is not supported by the simulator.

Simulation may be incorrect if your software attempts to access it

Listening on port 1383 for connection from GDB:

this is my C code:

#include "STDIO.h"# include "system.h"# include "ALTERA_AVALON_PIO_REGS.h"
int main ()
 {
   int i=14;
   int b;
    IOWR_ALTERA_AVALON_PIO_DATA(PIO_0_BASE,i);
  
   b = IORD_ALTERA_AVALON_PIO_DATA(PIO_0_BASE);
  
   }

I wanted to evaluate writing and reading to PIO periphery and when I step through instructions then it writes to b value 0 I tried diferent codes and didn&#39;t succeed http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif

Is it becouse of this Warning massage??

I also tried supported niosII_cyclone_1c20 bord example (full_featured) compiled and still this warning but now there was list of all SOPC components.

so what is wrong ?

2 Replies

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

    Today I made 2 8bit registers one is writedata and second is readdata conected them to Nios II core as custom made component and tried in nios IDE simple C code which writes to register1 and then reads this value from register 2 I Run debugger (ISS) and got this traditonal Warning and when step through code I couldn&#39;t read this second register value as in preveous examples

    (inQuartus waveform simulator I simulated Avalon slave signals (readdata and writedata) all was working).

    I have read all manuals about Nios II processor in Alteras webpage and also all availible Quartus manuals (more than one time) and there are not discribed sutch situations! all these Examples that are in Nios IDE install directory are too complex to me becose i am beginner in C language (previously code in Assembler)

    What is wrong with this bebugger or code ??

    C code.

    int main()
    {
      int i= 0xA8;
      int F;
      IOWR_TLED_PIO_WRITEDATA(TLED_PIO_0_BASE, i);
      F = IORD_TLED_PIO_READDATA(TLED_PIO_0_BASE);
      
    }

    here is New heder file.

    #ifndef __TLED_PIO_REGS_H__# define __TLED_PIO_REGS_H__
    # include <io.h>
    # define IORD_TLED_PIO_WRITEDATA(base)             IORD(base, 0) # define IOWR_TLED_PIO_WRITEDATA(base, data)       IOWR(base, 0, data)
    # define IORD_TLED_PIO_READDATA(base)             IORD(base, 1) # define IOWR_TLED_PIO_READDATA(base, data)       IOWR(base, 1, data)
    # endif /* __TLED_PIO_REGS_H__ */

    and here is VHDL.

    library altera;
    use altera.altera_europa_support_lib.all;
    LIBRARY ieee;
    USE ieee.std_logic_1164.all;
    use ieee.std_logic_arith.all;
    use ieee.std_logic_unsigned.all;
    --  Entity Declaration
    ENTITY T_pio IS
        -- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE!
        PORT
        (
      chipselect : IN STD_LOGIC;
      clk : IN STD_LOGIC;
      reset_n : IN STD_LOGIC;
      write_n : IN STD_LOGIC;
      writedata : IN STD_LOGIC_VECTOR(7 downto 0);
      address : IN STD_LOGIC_VECTOR(1 downto 0);
      read_n : IN STD_LOGIC;
      readdata : OUT STD_LOGIC_VECTOR(7 downto 0)
        );
        -- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE!
        
    END T_pio;
    --  Architecture Body
    ARCHITECTURE T_pio_architecture OF T_pio IS
       signal clk_en :  STD_LOGIC;
             signal data_out :  STD_LOGIC_VECTOR (7 DOWNTO 0);
       signal data_in :  STD_LOGIC_VECTOR (7 DOWNTO 0);
      signal data_in_out :  STD_LOGIC_VECTOR (7 DOWNTO 0);
    BEGIN
        
      clk_en <= std_logic&#39;(&#39;1&#39;);
      --s1, which is an e_avalon_slave
      process (clk, reset_n)
      begin
        if reset_n = &#39;0&#39; then
          data_out <= std_logic_vector&#39;("00000000");
        elsif clk&#39;event and clk = &#39;1&#39; then
          if std_logic&#39;(((chipselect AND NOT write_n) AND to_std_logic((((std_logic_vector&#39;("00000000000000000000000000000000") & (address)) = std_logic_vector&#39;("00000000000000000000000000000000")))))) = &#39;1&#39; then 
            data_out <= writedata(7 DOWNTO 0);
          end if;
        end if;
      end process;
      --s1, which is an e_avalon_slave
      process (clk, reset_n)
      begin
        if reset_n = &#39;0&#39; then
          data_in_out <= std_logic_vector&#39;("00000000");
        elsif clk&#39;event and clk = &#39;1&#39; then
          if std_logic&#39;(((chipselect AND NOT read_n) AND to_std_logic((((std_logic_vector&#39;("00000000000000000000000000000000") & (address)) = std_logic_vector&#39;("00000000000000000000000000000010")))))) = &#39;1&#39; then 
             data_in_out<= data_out(7 DOWNTO 0);
          end if;
        end if;
      end process;
    readdata <=data_in_out;
    END T_pio_architecture;
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I just Foung Answer why ISS debugger don&#39;t read my component register here is answer (text copie of Nios IDE help)

    "If any unsupported components are present in the system, the ISS displays a warning message at the start of the run or debug session. The ISS ignores writes to unsupported components during simulation. Reading from an unsupported component during simulation returns zero.

    suported component list:

    -All Nios II processor cores: Nios II/f, Nios II/s, Nios II/e

    -Interval timer core

    -JTAG UART core

    -UART core

    -On-chip memory (RAM/ROM)

    -SDRAM controller core

    -IDT71V416 SRAM (1 MB SRAM mounted on Nios development board)

    -EPCS serial flash controller core, with limitations."

    And here is aditonal limitations of ISS:

    Simulations are functional only, and not cycle-accurate.

    The ISS does not model Nios II instruction and data caches, and will not find bugs involving cache initialization, flushing, or bypassing.

    The ISS does not support reading or writing tightly coupled memories connected to the Nios II processor.

    The ISS does not support custom instructions.

    So the only way to see if my VHDL periphery works with nios II procesor is to debug it in hardware. (I will have to buy this cyclone dev. kit 150$)

    I am disapointed http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif in nios II IDE ISS debugger becouse compared to other processor softwares like Atmels AVRstudio and microchip MPLAB you can debugg all peripheral (PWM,Timers,IO...) bahavior in simulator.