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

Subversion Repositories t400

[/] [t400/] [trunk/] [sw/] [hex2rom/] [hex2rom.cpp] - Diff between revs 120 and 161

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

Rev 120 Rev 161
Line 58... Line 58...
//
//
// 0221 : Fixed small .UCF generation for small ROMs
// 0221 : Fixed small .UCF generation for small ROMs
//
//
// 0244 : Added Leonardo .UCF option
// 0244 : Added Leonardo .UCF option
//
//
 
// 28-Apr-2008 : Generate D for synchronous ROM in clocked process.
 
//
 
 
#include <stdio.h>
#include <stdio.h>
#include <string>
#include <string>
#include <vector>
#include <vector>
#include <iostream>
#include <iostream>
Line 702... Line 704...
                                printf("\n\tbegin");
                                printf("\n\tbegin");
                                printf("\n\t\tcase to_integer(unsigned(A)) is");
                                printf("\n\t\tcase to_integer(unsigned(A)) is");
                        }
                        }
                        else if (O == 's')
                        else if (O == 's')
                        {
                        {
                                printf("\n\tsignal A_r : std_logic_vector(%d downto 0);", aWidth - 1);
 
                                printf("\nbegin");
                                printf("\nbegin");
                                printf("\n\tprocess (Clk)");
                                printf("\n\tprocess (Clk)");
                                printf("\n\tbegin");
                                printf("\n\tbegin");
                                printf("\n\t\tif Clk'event and Clk = '1' then");
                                printf("\n\t\tif Clk'event and Clk = '1' then");
                                printf("\n\t\t\tA_r <= A;");
                                printf("\n\t\tcase to_integer(unsigned(A)) is");
                                printf("\n\t\tend if;");
 
                                printf("\n\tend process;");
 
                                printf("\n\tprocess (A_r)");
 
                                printf("\n\tbegin");
 
                                printf("\n\t\tcase to_integer(unsigned(A_r)) is");
 
                        }
                        }
                        else
                        else
                        {
                        {
                                printf("\n\tsubtype ROM_WORD is std_logic_vector(%d downto 0);", dWidth - 1);
                                printf("\n\tsubtype ROM_WORD is std_logic_vector(%d downto 0);", dWidth - 1);
                                printf("\n\ttype ROM_TABLE is array(0 to %d) of ROM_WORD;", words - 1);
                                printf("\n\ttype ROM_TABLE is array(0 to %d) of ROM_WORD;", words - 1);
Line 760... Line 756...
 
 
                        if (!O || O == 's')
                        if (!O || O == 's')
                        {
                        {
                                printf("\n\t\twhen others => D <= \"%s\";", strDC.c_str());
                                printf("\n\t\twhen others => D <= \"%s\";", strDC.c_str());
                                printf("\n\t\tend case;");
                                printf("\n\t\tend case;");
 
                                if (O == 's')
 
                                        printf("\n\tend if;");
                                printf("\n\tend process;");
                                printf("\n\tend process;");
                        }
                        }
                        else
                        else
                        {
                        {
                                printf("\nbegin");
                                printf("\nbegin");

powered by: WebSVN 2.1.0

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