-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrea Bettati
committed
Dec 19, 2019
1 parent
f399f33
commit 290a4b6
Showing
58 changed files
with
54,790 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Verilated -*- Makefile -*- | ||
# DESCRIPTION: Verilator output: Makefile for building Verilated archive or executable | ||
# | ||
# Execute this makefile from the object directory: | ||
# make -f Vtb_top_verilator.mk | ||
|
||
default: Vtb_top_verilator | ||
|
||
### Constants... | ||
# Perl executable (from $PERL) | ||
PERL = perl | ||
# Path to Verilator kit (from $VERILATOR_ROOT) | ||
VERILATOR_ROOT = /usr/pack/verilator-4.024-af/linux-x64/share/verilator | ||
# SystemC include directory with systemc.h (from $SYSTEMC_INCLUDE) | ||
SYSTEMC_INCLUDE ?= | ||
# SystemC library directory with libsystemc.a (from $SYSTEMC_LIBDIR) | ||
SYSTEMC_LIBDIR ?= | ||
|
||
### Switches... | ||
# SystemC output mode? 0/1 (from --sc) | ||
VM_SC = 0 | ||
# Legacy or SystemC output mode? 0/1 (from --sc) | ||
VM_SP_OR_SC = $(VM_SC) | ||
# Deprecated | ||
VM_PCLI = 1 | ||
# Deprecated: SystemC architecture to find link library path (from $SYSTEMC_ARCH) | ||
VM_SC_TARGET_ARCH = linux | ||
|
||
### Vars... | ||
# Design prefix (from --prefix) | ||
VM_PREFIX = Vtb_top_verilator | ||
# Module prefix (from --prefix) | ||
VM_MODPREFIX = Vtb_top_verilator | ||
# User CFLAGS (from -CFLAGS on Verilator command line) | ||
VM_USER_CFLAGS = \ | ||
-std=gnu++11 -O2 \ | ||
|
||
# User LDLIBS (from -LDFLAGS on Verilator command line) | ||
VM_USER_LDLIBS = \ | ||
|
||
# User .cpp files (from .cpp's on Verilator command line) | ||
VM_USER_CLASSES = \ | ||
tb_top_verilator \ | ||
|
||
# User .cpp directories (from .cpp's on Verilator command line) | ||
VM_USER_DIR = \ | ||
. \ | ||
|
||
|
||
### Default rules... | ||
# Include list of all generated classes | ||
include Vtb_top_verilator_classes.mk | ||
# Include global rules | ||
include $(VERILATOR_ROOT)/include/verilated.mk | ||
|
||
### Executable rules... (from --exe) | ||
VPATH += $(VM_USER_DIR) | ||
|
||
tb_top_verilator.o: tb_top_verilator.cpp | ||
$(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $< | ||
|
||
### Link rules... (from --exe) | ||
Vtb_top_verilator: $(VK_USER_OBJS) $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a | ||
$(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) $(SC_LIBS) | ||
|
||
|
||
# Verilated -*- Makefile -*- |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// DESCRIPTION: Generated by verilator_includer via makefile | ||
#define VL_INCLUDE_OPT include | ||
#include "Vtb_top_verilator.cpp" | ||
#include "Vtb_top_verilator___024unit.cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Vtb_top_verilator__ALLcls.o: Vtb_top_verilator__ALLcls.cpp \ | ||
Vtb_top_verilator.cpp Vtb_top_verilator.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilated_heavy.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilated.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilatedos.h \ | ||
Vtb_top_verilator__Dpi.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/vltstd/svdpi.h \ | ||
Vtb_top_verilator__Syms.h Vtb_top_verilator___024unit.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilated_dpi.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilated_sym_props.h \ | ||
Vtb_top_verilator___024unit.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// DESCRIPTION: Generated by verilator_includer via makefile | ||
#define VL_INCLUDE_OPT include | ||
#include "Vtb_top_verilator__Dpi.cpp" | ||
#include "Vtb_top_verilator__Syms.cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Vtb_top_verilator__ALLsup.o: Vtb_top_verilator__ALLsup.cpp \ | ||
Vtb_top_verilator__Dpi.cpp Vtb_top_verilator__Dpi.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/vltstd/svdpi.h \ | ||
Vtb_top_verilator.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilated_heavy.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilated.h \ | ||
/usr/pack/verilator-4.024-af/linux-x64/share/verilator/include/verilatedos.h \ | ||
Vtb_top_verilator__Syms.cpp Vtb_top_verilator__Syms.h \ | ||
Vtb_top_verilator___024unit.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Verilated -*- C++ -*- | ||
// DESCRIPTION: Verilator output: Implementation of DPI export functions. | ||
// | ||
// Verilator compiles this file in when DPI functions are used. | ||
// If you have multiple Verilated designs with the same DPI exported | ||
// function names, you will get multiple definition link errors from here. | ||
// This is an unfortunate result of the DPI specification. | ||
// To solve this, either | ||
// 1. Call Vtb_top_verilator::{export_function} instead, | ||
// and do not even bother to compile this file | ||
// or 2. Compile all __Dpi.cpp files in the same compiler run, | ||
// and #ifdefs already inserted here will sort everything out. | ||
|
||
#include "Vtb_top_verilator__Dpi.h" | ||
#include "Vtb_top_verilator.h" | ||
|
||
#ifndef _VL_DPIDECL_read_byte | ||
#define _VL_DPIDECL_read_byte | ||
int read_byte(const svLogicVecVal* byte_addr) { | ||
// DPI export at dp_ram.sv:72 | ||
return Vtb_top_verilator::read_byte(byte_addr); | ||
} | ||
#endif | ||
|
||
#ifndef _VL_DPIDECL_write_byte | ||
#define _VL_DPIDECL_write_byte | ||
void write_byte(const svLogicVecVal* byte_addr, const svLogicVecVal* val, svLogicVecVal* other) { | ||
// DPI export at dp_ram.sv:76 | ||
return Vtb_top_verilator::write_byte(byte_addr, val, other); | ||
} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Verilated -*- C++ -*- | ||
// DESCRIPTION: Verilator output: Prototypes for DPI import and export functions. | ||
// | ||
// Verilator includes this file in all generated .cpp files that use DPI functions. | ||
// Manually include this file where DPI .c import functions are declared to insure | ||
// the C functions match the expectations of the DPI imports. | ||
|
||
#include "svdpi.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
|
||
// DPI EXPORTS | ||
// DPI export at dp_ram.sv:72 | ||
extern int read_byte(const svLogicVecVal* byte_addr); | ||
// DPI export at dp_ram.sv:76 | ||
extern void write_byte(const svLogicVecVal* byte_addr, const svLogicVecVal* val, svLogicVecVal* other); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Verilated -*- C++ -*- | ||
// DESCRIPTION: Verilator output: Symbol table implementation internals | ||
|
||
#include "Vtb_top_verilator__Syms.h" | ||
#include "Vtb_top_verilator.h" | ||
#include "Vtb_top_verilator___024unit.h" | ||
|
||
|
||
|
||
// FUNCTIONS | ||
Vtb_top_verilator__Syms::Vtb_top_verilator__Syms(Vtb_top_verilator* topp, const char* namep) | ||
// Setup locals | ||
: __Vm_namep(namep) | ||
, __Vm_didInit(false) | ||
// Setup submodule names | ||
{ | ||
// Pointer to top level | ||
TOPp = topp; | ||
// Setup each module's pointers to their submodules | ||
// Setup each module's pointer back to symbol table (for public functions) | ||
TOPp->__Vconfigure(this, true); | ||
// Setup scopes | ||
__Vscope_tb_top_verilator__riscv_wrapper_i__ram_i.configure(this, name(), "tb_top_verilator.riscv_wrapper_i.ram_i", "ram_i", VerilatedScope::SCOPE_OTHER); | ||
__Vscope_tb_top_verilator__riscv_wrapper_i__ram_i__dp_ram_i.configure(this, name(), "tb_top_verilator.riscv_wrapper_i.ram_i.dp_ram_i", "dp_ram_i", VerilatedScope::SCOPE_OTHER); | ||
__Vscope_tb_top_verilator__riscv_wrapper_i__ram_i__read_mux.configure(this, name(), "tb_top_verilator.riscv_wrapper_i.ram_i.read_mux", "read_mux", VerilatedScope::SCOPE_OTHER); | ||
// Setup export functions | ||
for (int __Vfinal=0; __Vfinal<2; __Vfinal++) { | ||
__Vscope_tb_top_verilator__riscv_wrapper_i__ram_i__dp_ram_i.exportInsert(__Vfinal, "read_byte", (void*)(&Vtb_top_verilator::__Vdpiexp_tb_top_verilator__DOT__riscv_wrapper_i__DOT__ram_i__DOT__dp_ram_i__DOT__read_byte_TOP)); | ||
__Vscope_tb_top_verilator__riscv_wrapper_i__ram_i__dp_ram_i.exportInsert(__Vfinal, "write_byte", (void*)(&Vtb_top_verilator::__Vdpiexp_tb_top_verilator__DOT__riscv_wrapper_i__DOT__ram_i__DOT__dp_ram_i__DOT__write_byte_TOP)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Verilated -*- C++ -*- | ||
// DESCRIPTION: Verilator output: Symbol table internal header | ||
// | ||
// Internal details; most calling programs do not need this header, | ||
// unless using verilator public meta comments. | ||
|
||
#ifndef _Vtb_top_verilator__Syms_H_ | ||
#define _Vtb_top_verilator__Syms_H_ | ||
|
||
#include "verilated_heavy.h" | ||
|
||
// INCLUDE MODULE CLASSES | ||
#include "Vtb_top_verilator.h" | ||
#include "Vtb_top_verilator___024unit.h" | ||
|
||
// DPI TYPES for DPI Export callbacks (Internal use) | ||
typedef void (*Vtb_top_verilator__Vcb_read_byte_t) (Vtb_top_verilator__Syms* __restrict vlSymsp, const IData/*21:0*/ byte_addr, IData/*31:0*/(& read_byte__Vfuncrtn)); | ||
typedef void (*Vtb_top_verilator__Vcb_write_byte_t) (Vtb_top_verilator__Syms* __restrict vlSymsp, const IData/*31:0*/ byte_addr, const CData/*7:0*/ val, CData/*7:0*/(& other)); | ||
|
||
// SYMS CLASS | ||
class Vtb_top_verilator__Syms : public VerilatedSyms { | ||
public: | ||
|
||
// LOCAL STATE | ||
const char* __Vm_namep; | ||
bool __Vm_didInit; | ||
|
||
// SUBCELL STATE | ||
Vtb_top_verilator* TOPp; | ||
|
||
// SCOPE NAMES | ||
VerilatedScope __Vscope_tb_top_verilator__riscv_wrapper_i__ram_i; | ||
VerilatedScope __Vscope_tb_top_verilator__riscv_wrapper_i__ram_i__dp_ram_i; | ||
VerilatedScope __Vscope_tb_top_verilator__riscv_wrapper_i__ram_i__read_mux; | ||
|
||
// CREATORS | ||
Vtb_top_verilator__Syms(Vtb_top_verilator* topp, const char* namep); | ||
~Vtb_top_verilator__Syms() {} | ||
|
||
// METHODS | ||
inline const char* name() { return __Vm_namep; } | ||
|
||
} VL_ATTR_ALIGNED(64); | ||
|
||
#endif // guard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Verilated -*- C++ -*- | ||
// DESCRIPTION: Verilator output: Design implementation internals | ||
// See Vtb_top_verilator.h for the primary calling header | ||
|
||
#include "Vtb_top_verilator___024unit.h" | ||
#include "Vtb_top_verilator__Syms.h" | ||
|
||
#include "verilated_dpi.h" | ||
|
||
|
||
//-------------------- | ||
// STATIC VARIABLES | ||
|
||
|
||
//-------------------- | ||
|
||
VL_CTOR_IMP(Vtb_top_verilator___024unit) { | ||
// Reset internal values | ||
// Reset structure values | ||
_ctor_var_reset(); | ||
} | ||
|
||
void Vtb_top_verilator___024unit::__Vconfigure(Vtb_top_verilator__Syms* vlSymsp, bool first) { | ||
if (0 && first) {} // Prevent unused | ||
this->__VlSymsp = vlSymsp; | ||
} | ||
|
||
Vtb_top_verilator___024unit::~Vtb_top_verilator___024unit() { | ||
} | ||
|
||
//-------------------- | ||
// Internal Methods | ||
|
||
void Vtb_top_verilator___024unit::_ctor_var_reset() { | ||
VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb_top_verilator___024unit::_ctor_var_reset\n"); ); | ||
} |
Oops, something went wrong.