OpenCores
URL https://opencores.org/ocsvn/raytrac/raytrac/trunk

Subversion Repositories raytrac

[/] [raytrac/] [branches/] [fp/] [rt_tb.vhd] - Diff between revs 155 and 156

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 155 Rev 156
Line 7... Line 7...
entity rt_tb is
entity rt_tb is
end entity;
end entity;
 
 
architecture rt_tb_arch of rt_tb is
architecture rt_tb_arch of rt_tb is
 
 
        signal  clk,rst,rd,wr   : std_logic;
        --!TBXSTART:CTRL
        signal  add                             : std_logic_vector(12 downto 0);
        signal  sclk,srst,srd,swr       : std_logic;
        signal  d,q                             : std_logic_vector(31 downto 0);
        --!TBXEND
        signal  int                             : std_logic_vector(7 downto 0);
        --!TBXSTART:ADD_BUS
 
        signal  sadd                            : std_logic_vector(12 downto 0);
 
        --!TBXEND
 
        --!TBXSTART:DATA_BUS
 
        signal  sd,sq                           : std_logic_vector(31 downto 0);
 
        --!TBXEND
 
        --!TBXSTART:INT_BUS
 
        signal  sint                            : std_logic_vector(7 downto 0);
 
        --!TBXEND
 
 
begin
begin
 
 
        reset_p : process
        reset_p : process
        begin
        begin
Line 36... Line 44...
                        clk <= '1';
                        clk <= '1';
                end loop clock_loop;
                end loop clock_loop;
        end process clock_p;
        end process clock_p;
 
 
 
 
 
        --!TBXINSTANCESTART
        dude : raytrac
        dude : raytrac
        port map (
        port map (
 
 
                clk => clk,
                clk => sclk,
                rst => rst,
                rst => srst,
                rd => rd,
                rd => srd,
                wr => wr,
                wr => swr,
                add => add,
                add => sadd,
                d => d,
                d => sd,
                q => q,
                q => sq,
                int => int
                int => sint
 
 
        );
        );
 
        --!TBXINSTANCEEND
 
 
 
 
        --! Este proceso c&aacute;lcula los rayos/vectores que desde un observador van a una pantalla de 16x16 pixeles.
        --! Este proceso c&aacute;lcula los rayos/vectores que desde un observador van a una pantalla de 16x16 pixeles.
        --! Posteriormente cada uno de estos rayos vectores es ingresado a la memoria del Raytrac. Son 256 rayos/vectores, que se escriben en los primeros 16 bloques vectoriales de los 32 que posee el bloque vectorial A.
        --! Posteriormente cada uno de estos rayos vectores es ingresado a la memoria del Raytrac. Son 256 rayos/vectores, que se escriben en los primeros 16 bloques vectoriales de los 32 que posee el bloque vectorial A.
        --! Finalmente se escribe en la cola de instrucciones la instrucci&oacute;n "nrm". 
        --! Finalmente se escribe en la cola de instrucciones la instrucci&oacute;n "nrm". 
Line 112... Line 121...
                                wr <= '0';
                                wr <= '0';
                        end if;
                        end if;
                end if;
                end if;
        end process normalization_test;
        end process normalization_test;
 
 
 
 
 
        --! tb_compiler: The following line (disp:process) is MANDATORY to be so tb_compiler knows here is where the display process takes place. 
        disp: process
        disp: process
 
                --! if a csv output file is NOT specefied then defaultoutput.csv is the name took as the default output file name, otherwise tb_compiler will change the following line to the proper user selected name. 
                file f : text open write_mode is "default_output.csv";
                file f : text open write_mode is "default_output.csv";
 
                variable l : line;
        begin
        begin
 
                --! tb_compiler: You can write lines as many as you want. tb_compiler will set lines after the lines you wrote.........
                ap_print(f,string'("#RAYTRAC TESTBENCH OUTPUT FILE"));
                ap_print(f,string'("#RAYTRAC TESTBENCH OUTPUT FILE"));
                ap_print(f,string'("#This file is automatically generated by tb_compiler script, by Julian Andres Guarin Reyes"));
                ap_print(f,string'("#This file is automatically generated by tb_compiler script, by Julian Andres Guarin Reyes"));
                ap_print(f,string'("#TB_COMPILER_GEN"));
 
        end process
                wait for 5 ns;
 
                wait until rst=not(rstMasterValue);
 
                wait until clock='1';
 
                wait for tclk_2+tclk_4;
 
 
 
 
 
                --! from here on, tb_compiler writes the data to be displayed
 
                --! tb_compiler: the following line MUST go here
 
                disp_loop:loop
 
                        --!TBXDISPLAYOPERATION
 
                        wait for tclk;
 
 
 
                end loop;
 
 
 
 
 
        end process;
 
 
 
 
end architecture;
end architecture;
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.