OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [utils/] [bin2vlogarray.c] - Diff between revs 349 and 361

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

Rev 349 Rev 361
Line 4... Line 4...
/*                    H E A D E R   I N F O R M A T I O N                     */
/*                    H E A D E R   I N F O R M A T I O N                     */
/*                                                                            */
/*                                                                            */
/******************************************************************************/
/******************************************************************************/
 
 
// Project Name                   : ORPSoC v2
// Project Name                   : ORPSoC v2
// File Name                      : bin2c.c
// File Name                      : bin2vlogarray.c
// Prepared By                    : 
// Prepared By                    : 
// Project Start                  : 
// Project Start                  : 
 
 
/*$$COPYRIGHT NOTICE*/
/*$$COPYRIGHT NOTICE*/
/******************************************************************************/
/******************************************************************************/
Line 42... Line 42...
//
//
// Generate verilog lines assigning array output from binary final input
// Generate verilog lines assigning array output from binary final input
//
//
// Looks like this:
// Looks like this:
//
//
// 0 : wb_dat_o <= #1 32'h18000000;
// 0 : wb_dat_o <= 32'h18000000;
// 1 : wb_dat_o <= #1 32'h18200000;
// 1 : wb_dat_o <= 32'h18200000;
// 2 : wb_dat_o <= #1 32'h1880b000;
// 2 : wb_dat_o <= 32'h1880b000;
// 3 : wb_dat_o <= #1 32'ha8400051;
// 3 : wb_dat_o <= 32'ha8400051;
// 4 : wb_dat_o <= #1 32'hd8041000;
// 4 : wb_dat_o <= 32'hd8041000;
// 5 : wb_dat_o <= #1 32'h18c00000;
// 5 : wb_dat_o <= 32'h18c00000;
// 6 : wb_dat_o <= #1 32'h18e00000;
// 6 : wb_dat_o <= 32'h18e00000;
//
//
// etc...
// etc...
//
//
//
// The generated file is pulled into the appropriate part of a verilog 
 
// module and gets synthesized.
 
 
#include <stdio.h>
#include <stdio.h>
#include <stdint.h>
#include <stdint.h>
 
 
#define OUT_REG_STRING "wb_dat_o"
#define OUT_REG_STRING "wb_dat_o"
 
 
 
// OR1200 no longer has these #delays on synchronous assigns - so we don't need
 
// them here anymore either.
//#define ASSIGN_STRING "<= #1"
//#define ASSIGN_STRING "<= #1"
#define ASSIGN_STRING "<= "
#define ASSIGN_STRING "<= "
 
 
#define SIZE_STRING "32'h"
#define SIZE_STRING "32'h"
 
 
 
// Concatenate the defines 
#define BEFORE_STRING "%d : "OUT_REG_STRING" "ASSIGN_STRING" "SIZE_STRING
#define BEFORE_STRING "%d : "OUT_REG_STRING" "ASSIGN_STRING" "SIZE_STRING
 
 
//#define BEFORE_STRING "%d : wb_dat_o <= 32'h"
//#define BEFORE_STRING "%d : wb_dat_o <= 32'h"
 
 
 
 

powered by: WebSVN 2.1.0

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