diff --git a/labs/lab6/bibp.v b/labs/lab6/bibp.v index c366289..25e6252 100644 --- a/labs/lab6/bibp.v +++ b/labs/lab6/bibp.v @@ -18,14 +18,18 @@ assign v2 = buyruk[UZUNLUK/2 : 0];*/ // !!! LOCALPARAM IVERILOG DA PROBLEMLI OLDUGU ICIN KULLANILMIYOR !!! always@(*) begin - case(buyruk[UZUNLUK+2:UZUNLUK-1]) - 3'b000: sonuc = buyruk[UZUNLUK - 1 : UZUNLUK/2] + buyruk[(UZUNLUK/2) - 1 : 0]; - 3'b001: sonuc = buyruk[UZUNLUK - 1 : UZUNLUK/2] - buyruk[(UZUNLUK/2) - 1 : 0]; // SUBTRACTION ?????? CHECK!!! - 3'b010: sonuc = buyruk[UZUNLUK - 1 : UZUNLUK/2] & buyruk[(UZUNLUK/2) - 1 : 0]; - 3'b011: sonuc = buyruk[UZUNLUK - 1 : UZUNLUK/2] | buyruk[(UZUNLUK/2) - 1 : 0]; - 3'b100: sonuc = buyruk[UZUNLUK - 1 : UZUNLUK/2] ^ buyruk[(UZUNLUK/2) - 1 : 0]; - default: sonuc = buyruk[UZUNLUK - 1 : UZUNLUK/2] + buyruk[(UZUNLUK/2) - 1 : 0]; + $display("%d", buyruk[UZUNLUK - 1 : UZUNLUK/2]); + $display("%d", buyruk[(UZUNLUK/2) - 1 : 0]); + $display("%d", buyruk[UZUNLUK - 1 : UZUNLUK/2] - buyruk[(UZUNLUK/2) - 1 : 0]); + case(buyruk[UZUNLUK+2:UZUNLUK]) + 3'b000: sonuc = buyruk[(UZUNLUK - 1) : UZUNLUK/2] + buyruk[(UZUNLUK/2) - 1 : 0]; + 3'b001: sonuc = buyruk[(UZUNLUK - 1) : UZUNLUK/2] - buyruk[(UZUNLUK/2) - 1 : 0]; // SUBTRACTION ?????? CHECK!!! + 3'b010: sonuc = {1'b0, buyruk[UZUNLUK - 1 : UZUNLUK/2] & buyruk[(UZUNLUK/2) - 1 : 0]}; + 3'b011: sonuc = {1'b0, buyruk[UZUNLUK - 1 : UZUNLUK/2] | buyruk[(UZUNLUK/2) - 1 : 0]}; + 3'b100: sonuc = {1'b0, buyruk[UZUNLUK - 1 : UZUNLUK/2] ^ buyruk[(UZUNLUK/2) - 1 : 0]}; + default: sonuc = -1; endcase + $display("%b", sonuc); end endmodule \ No newline at end of file diff --git a/labs/lab6/bibpTB.v b/labs/lab6/bibpTB.v index cfd8f55..4052eb3 100644 --- a/labs/lab6/bibpTB.v +++ b/labs/lab6/bibpTB.v @@ -10,7 +10,7 @@ initial begin $dumpfile("vbibp.vcd"); $dumpvars; - buyruk = 11'b001_0101_0100; #10; + buyruk = 11'b111_0101_0100; #10; $finish; end endmodule \ No newline at end of file diff --git a/labs/lab6/obj_dir/Vbibp b/labs/lab6/obj_dir/Vbibp new file mode 100644 index 0000000..3e5cdce Binary files /dev/null and b/labs/lab6/obj_dir/Vbibp differ diff --git a/labs/lab6/obj_dir/Vbibp.cpp b/labs/lab6/obj_dir/Vbibp.cpp new file mode 100644 index 0000000..face1a2 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp.cpp @@ -0,0 +1,92 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Model implementation (design independent parts) + +#include "Vbibp.h" +#include "Vbibp__Syms.h" + +//============================================================ +// Constructors + +Vbibp::Vbibp(VerilatedContext* _vcontextp__, const char* _vcname__) + : VerilatedModel{*_vcontextp__} + , vlSymsp{new Vbibp__Syms(contextp(), _vcname__, this)} + , rootp{&(vlSymsp->TOP)} +{ + // Register model with the context + contextp()->addModel(this); +} + +Vbibp::Vbibp(const char* _vcname__) + : Vbibp(Verilated::threadContextp(), _vcname__) +{ +} + +//============================================================ +// Destructor + +Vbibp::~Vbibp() { + delete vlSymsp; +} + +//============================================================ +// Evaluation function + +#ifdef VL_DEBUG +void Vbibp___024root___eval_debug_assertions(Vbibp___024root* vlSelf); +#endif // VL_DEBUG +void Vbibp___024root___eval_static(Vbibp___024root* vlSelf); +void Vbibp___024root___eval_initial(Vbibp___024root* vlSelf); +void Vbibp___024root___eval_settle(Vbibp___024root* vlSelf); +void Vbibp___024root___eval(Vbibp___024root* vlSelf); + +void Vbibp::eval_step() { + VL_DEBUG_IF(VL_DBG_MSGF("+++++TOP Evaluate Vbibp::eval_step\n"); ); +#ifdef VL_DEBUG + // Debug assertions + Vbibp___024root___eval_debug_assertions(&(vlSymsp->TOP)); +#endif // VL_DEBUG + if (VL_UNLIKELY(!vlSymsp->__Vm_didInit)) { + vlSymsp->__Vm_didInit = true; + VL_DEBUG_IF(VL_DBG_MSGF("+ Initial\n");); + Vbibp___024root___eval_static(&(vlSymsp->TOP)); + Vbibp___024root___eval_initial(&(vlSymsp->TOP)); + Vbibp___024root___eval_settle(&(vlSymsp->TOP)); + } + // MTask 0 start + VL_DEBUG_IF(VL_DBG_MSGF("MTask0 starting\n");); + Verilated::mtaskId(0); + VL_DEBUG_IF(VL_DBG_MSGF("+ Eval\n");); + Vbibp___024root___eval(&(vlSymsp->TOP)); + // Evaluate cleanup + Verilated::endOfThreadMTask(vlSymsp->__Vm_evalMsgQp); + Verilated::endOfEval(vlSymsp->__Vm_evalMsgQp); +} + +//============================================================ +// Events and timing +bool Vbibp::eventsPending() { return !vlSymsp->TOP.__VdlySched.empty(); } + +uint64_t Vbibp::nextTimeSlot() { return vlSymsp->TOP.__VdlySched.nextTimeSlot(); } + +//============================================================ +// Utilities + +const char* Vbibp::name() const { + return vlSymsp->name(); +} + +//============================================================ +// Invoke final blocks + +void Vbibp___024root___eval_final(Vbibp___024root* vlSelf); + +VL_ATTR_COLD void Vbibp::final() { + Vbibp___024root___eval_final(&(vlSymsp->TOP)); +} + +//============================================================ +// Implementations of abstract methods from VerilatedModel + +const char* Vbibp::hierName() const { return vlSymsp->name(); } +const char* Vbibp::modelName() const { return "Vbibp"; } +unsigned Vbibp::threads() const { return 1; } diff --git a/labs/lab6/obj_dir/Vbibp.h b/labs/lab6/obj_dir/Vbibp.h new file mode 100644 index 0000000..d032c88 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp.h @@ -0,0 +1,72 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Primary model header +// +// This header should be included by all source files instantiating the design. +// The class here is then constructed to instantiate the design. +// See the Verilator manual for examples. + +#ifndef VERILATED_VBIBP_H_ +#define VERILATED_VBIBP_H_ // guard + +#include "verilated.h" + +class Vbibp__Syms; +class Vbibp___024root; + +// This class is the main interface to the Verilated model +class Vbibp VL_NOT_FINAL : public VerilatedModel { + private: + // Symbol table holding complete model state (owned by this class) + Vbibp__Syms* const vlSymsp; + + public: + + // PORTS + // The application code writes and reads these signals to + // propagate new values into/out from the Verilated model. + + // CELLS + // Public to allow access to /* verilator public */ items. + // Otherwise the application code can consider these internals. + + // Root instance pointer to allow access to model internals, + // including inlined /* verilator public_flat_* */ items. + Vbibp___024root* const rootp; + + // CONSTRUCTORS + /// Construct the model; called by application code + /// If contextp is null, then the model will use the default global context + /// If name is "", then makes a wrapper with a + /// single model invisible with respect to DPI scope names. + explicit Vbibp(VerilatedContext* contextp, const char* name = "TOP"); + explicit Vbibp(const char* name = "TOP"); + /// Destroy the model; called (often implicitly) by application code + virtual ~Vbibp(); + private: + VL_UNCOPYABLE(Vbibp); ///< Copying not allowed + + public: + // API METHODS + /// Evaluate the model. Application must call when inputs change. + void eval() { eval_step(); } + /// Evaluate when calling multiple units/models per time step. + void eval_step(); + /// Evaluate at end of a timestep for tracing, when using eval_step(). + /// Application must call after all eval() and before time changes. + void eval_end_step() {} + /// Simulation complete, run final blocks. Application must call on completion. + void final(); + /// Are there scheduled events to handle? + bool eventsPending(); + /// Returns time at next time slot. Aborts if !eventsPending() + uint64_t nextTimeSlot(); + /// Retrieve name of this model instance (as passed to constructor). + const char* name() const; + + // Abstract methods from VerilatedModel + const char* hierName() const override final; + const char* modelName() const override final; + unsigned threads() const override final; +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + +#endif // guard diff --git a/labs/lab6/obj_dir/Vbibp.mk b/labs/lab6/obj_dir/Vbibp.mk new file mode 100644 index 0000000..3184905 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp.mk @@ -0,0 +1,65 @@ +# Verilated -*- Makefile -*- +# DESCRIPTION: Verilator output: Makefile for building Verilated archive or executable +# +# Execute this makefile from the object directory: +# make -f Vbibp.mk + +default: Vbibp + +### Constants... +# Perl executable (from $PERL) +PERL = perl +# Path to Verilator kit (from $VERILATOR_ROOT) +VERILATOR_ROOT = /usr/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... +# C++ code coverage 0/1 (from --prof-c) +VM_PROFC = 0 +# 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 = Vbibp +# Module prefix (from --prefix) +VM_MODPREFIX = Vbibp +# User CFLAGS (from -CFLAGS on Verilator command line) +VM_USER_CFLAGS = \ + -DVL_TIME_CONTEXT \ + +# User LDLIBS (from -LDFLAGS on Verilator command line) +VM_USER_LDLIBS = \ + +# User .cpp files (from .cpp's on Verilator command line) +VM_USER_CLASSES = \ + +# User .cpp directories (from .cpp's on Verilator command line) +VM_USER_DIR = \ + + +### Default rules... +# Include list of all generated classes +include Vbibp_classes.mk +# Include global rules +include $(VERILATOR_ROOT)/include/verilated.mk + +### Executable rules... (from --exe) +VPATH += $(VM_USER_DIR) + + +### Link rules... (from --exe) +Vbibp: $(VK_USER_OBJS) $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a $(VM_HIER_LIBS) + $(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LIBS) $(SC_LIBS) -o $@ + + +# Verilated -*- Makefile -*- diff --git a/labs/lab6/obj_dir/VbibpTB.cpp b/labs/lab6/obj_dir/VbibpTB.cpp new file mode 100644 index 0000000..ed688e7 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB.cpp @@ -0,0 +1,92 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Model implementation (design independent parts) + +#include "VbibpTB.h" +#include "VbibpTB__Syms.h" + +//============================================================ +// Constructors + +VbibpTB::VbibpTB(VerilatedContext* _vcontextp__, const char* _vcname__) + : VerilatedModel{*_vcontextp__} + , vlSymsp{new VbibpTB__Syms(contextp(), _vcname__, this)} + , rootp{&(vlSymsp->TOP)} +{ + // Register model with the context + contextp()->addModel(this); +} + +VbibpTB::VbibpTB(const char* _vcname__) + : VbibpTB(Verilated::threadContextp(), _vcname__) +{ +} + +//============================================================ +// Destructor + +VbibpTB::~VbibpTB() { + delete vlSymsp; +} + +//============================================================ +// Evaluation function + +#ifdef VL_DEBUG +void VbibpTB___024root___eval_debug_assertions(VbibpTB___024root* vlSelf); +#endif // VL_DEBUG +void VbibpTB___024root___eval_static(VbibpTB___024root* vlSelf); +void VbibpTB___024root___eval_initial(VbibpTB___024root* vlSelf); +void VbibpTB___024root___eval_settle(VbibpTB___024root* vlSelf); +void VbibpTB___024root___eval(VbibpTB___024root* vlSelf); + +void VbibpTB::eval_step() { + VL_DEBUG_IF(VL_DBG_MSGF("+++++TOP Evaluate VbibpTB::eval_step\n"); ); +#ifdef VL_DEBUG + // Debug assertions + VbibpTB___024root___eval_debug_assertions(&(vlSymsp->TOP)); +#endif // VL_DEBUG + if (VL_UNLIKELY(!vlSymsp->__Vm_didInit)) { + vlSymsp->__Vm_didInit = true; + VL_DEBUG_IF(VL_DBG_MSGF("+ Initial\n");); + VbibpTB___024root___eval_static(&(vlSymsp->TOP)); + VbibpTB___024root___eval_initial(&(vlSymsp->TOP)); + VbibpTB___024root___eval_settle(&(vlSymsp->TOP)); + } + // MTask 0 start + VL_DEBUG_IF(VL_DBG_MSGF("MTask0 starting\n");); + Verilated::mtaskId(0); + VL_DEBUG_IF(VL_DBG_MSGF("+ Eval\n");); + VbibpTB___024root___eval(&(vlSymsp->TOP)); + // Evaluate cleanup + Verilated::endOfThreadMTask(vlSymsp->__Vm_evalMsgQp); + Verilated::endOfEval(vlSymsp->__Vm_evalMsgQp); +} + +//============================================================ +// Events and timing +bool VbibpTB::eventsPending() { return !vlSymsp->TOP.__VdlySched.empty(); } + +uint64_t VbibpTB::nextTimeSlot() { return vlSymsp->TOP.__VdlySched.nextTimeSlot(); } + +//============================================================ +// Utilities + +const char* VbibpTB::name() const { + return vlSymsp->name(); +} + +//============================================================ +// Invoke final blocks + +void VbibpTB___024root___eval_final(VbibpTB___024root* vlSelf); + +VL_ATTR_COLD void VbibpTB::final() { + VbibpTB___024root___eval_final(&(vlSymsp->TOP)); +} + +//============================================================ +// Implementations of abstract methods from VerilatedModel + +const char* VbibpTB::hierName() const { return vlSymsp->name(); } +const char* VbibpTB::modelName() const { return "VbibpTB"; } +unsigned VbibpTB::threads() const { return 1; } diff --git a/labs/lab6/obj_dir/VbibpTB.h b/labs/lab6/obj_dir/VbibpTB.h new file mode 100644 index 0000000..2e0bf29 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB.h @@ -0,0 +1,72 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Primary model header +// +// This header should be included by all source files instantiating the design. +// The class here is then constructed to instantiate the design. +// See the Verilator manual for examples. + +#ifndef VERILATED_VBIBPTB_H_ +#define VERILATED_VBIBPTB_H_ // guard + +#include "verilated.h" + +class VbibpTB__Syms; +class VbibpTB___024root; + +// This class is the main interface to the Verilated model +class VbibpTB VL_NOT_FINAL : public VerilatedModel { + private: + // Symbol table holding complete model state (owned by this class) + VbibpTB__Syms* const vlSymsp; + + public: + + // PORTS + // The application code writes and reads these signals to + // propagate new values into/out from the Verilated model. + + // CELLS + // Public to allow access to /* verilator public */ items. + // Otherwise the application code can consider these internals. + + // Root instance pointer to allow access to model internals, + // including inlined /* verilator public_flat_* */ items. + VbibpTB___024root* const rootp; + + // CONSTRUCTORS + /// Construct the model; called by application code + /// If contextp is null, then the model will use the default global context + /// If name is "", then makes a wrapper with a + /// single model invisible with respect to DPI scope names. + explicit VbibpTB(VerilatedContext* contextp, const char* name = "TOP"); + explicit VbibpTB(const char* name = "TOP"); + /// Destroy the model; called (often implicitly) by application code + virtual ~VbibpTB(); + private: + VL_UNCOPYABLE(VbibpTB); ///< Copying not allowed + + public: + // API METHODS + /// Evaluate the model. Application must call when inputs change. + void eval() { eval_step(); } + /// Evaluate when calling multiple units/models per time step. + void eval_step(); + /// Evaluate at end of a timestep for tracing, when using eval_step(). + /// Application must call after all eval() and before time changes. + void eval_end_step() {} + /// Simulation complete, run final blocks. Application must call on completion. + void final(); + /// Are there scheduled events to handle? + bool eventsPending(); + /// Returns time at next time slot. Aborts if !eventsPending() + uint64_t nextTimeSlot(); + /// Retrieve name of this model instance (as passed to constructor). + const char* name() const; + + // Abstract methods from VerilatedModel + const char* hierName() const override final; + const char* modelName() const override final; + unsigned threads() const override final; +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + +#endif // guard diff --git a/labs/lab6/obj_dir/VbibpTB.mk b/labs/lab6/obj_dir/VbibpTB.mk new file mode 100644 index 0000000..f2d9f20 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB.mk @@ -0,0 +1,65 @@ +# Verilated -*- Makefile -*- +# DESCRIPTION: Verilator output: Makefile for building Verilated archive or executable +# +# Execute this makefile from the object directory: +# make -f VbibpTB.mk + +default: VbibpTB + +### Constants... +# Perl executable (from $PERL) +PERL = perl +# Path to Verilator kit (from $VERILATOR_ROOT) +VERILATOR_ROOT = /usr/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... +# C++ code coverage 0/1 (from --prof-c) +VM_PROFC = 0 +# 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 = VbibpTB +# Module prefix (from --prefix) +VM_MODPREFIX = VbibpTB +# User CFLAGS (from -CFLAGS on Verilator command line) +VM_USER_CFLAGS = \ + -DVL_TIME_CONTEXT \ + +# User LDLIBS (from -LDFLAGS on Verilator command line) +VM_USER_LDLIBS = \ + +# User .cpp files (from .cpp's on Verilator command line) +VM_USER_CLASSES = \ + +# User .cpp directories (from .cpp's on Verilator command line) +VM_USER_DIR = \ + + +### Default rules... +# Include list of all generated classes +include VbibpTB_classes.mk +# Include global rules +include $(VERILATOR_ROOT)/include/verilated.mk + +### Executable rules... (from --exe) +VPATH += $(VM_USER_DIR) + + +### Link rules... (from --exe) +VbibpTB: $(VK_USER_OBJS) $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a $(VM_HIER_LIBS) + $(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LIBS) $(SC_LIBS) -o $@ + + +# Verilated -*- Makefile -*- diff --git a/labs/lab6/obj_dir/VbibpTB__Syms.cpp b/labs/lab6/obj_dir/VbibpTB__Syms.cpp new file mode 100644 index 0000000..a3dca8f --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB__Syms.cpp @@ -0,0 +1,26 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Symbol table implementation internals + +#include "VbibpTB__Syms.h" +#include "VbibpTB.h" +#include "VbibpTB___024root.h" + +// FUNCTIONS +VbibpTB__Syms::~VbibpTB__Syms() +{ +} + +VbibpTB__Syms::VbibpTB__Syms(VerilatedContext* contextp, const char* namep, VbibpTB* modelp) + : VerilatedSyms{contextp} + // Setup internal state of the Syms class + , __Vm_modelp{modelp} + // Setup module instances + , TOP{this, namep} +{ + // Configure time unit / time precision + _vm_contextp__->timeunit(-12); + _vm_contextp__->timeprecision(-12); + // Setup each module's pointers to their submodules + // Setup each module's pointer back to symbol table (for public functions) + TOP.__Vconfigure(true); +} diff --git a/labs/lab6/obj_dir/VbibpTB__Syms.h b/labs/lab6/obj_dir/VbibpTB__Syms.h new file mode 100644 index 0000000..366d202 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB__Syms.h @@ -0,0 +1,37 @@ +// 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 VERILATED_VBIBPTB__SYMS_H_ +#define VERILATED_VBIBPTB__SYMS_H_ // guard + +#include "verilated.h" + +// INCLUDE MODEL CLASS + +#include "VbibpTB.h" + +// INCLUDE MODULE CLASSES +#include "VbibpTB___024root.h" + +// SYMS CLASS (contains all model state) +class VbibpTB__Syms final : public VerilatedSyms { + public: + // INTERNAL STATE + VbibpTB* const __Vm_modelp; + bool __Vm_didInit = false; + + // MODULE INSTANCE STATE + VbibpTB___024root TOP; + + // CONSTRUCTORS + VbibpTB__Syms(VerilatedContext* contextp, const char* namep, VbibpTB* modelp); + ~VbibpTB__Syms(); + + // METHODS + const char* name() { return TOP.name(); } +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + +#endif // guard diff --git a/labs/lab6/obj_dir/VbibpTB___024root.h b/labs/lab6/obj_dir/VbibpTB___024root.h new file mode 100644 index 0000000..2ab1429 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB___024root.h @@ -0,0 +1,39 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design internal header +// See VbibpTB.h for the primary calling header + +#ifndef VERILATED_VBIBPTB___024ROOT_H_ +#define VERILATED_VBIBPTB___024ROOT_H_ // guard + +#include "verilated.h" +#include "verilated_timing.h" + +class VbibpTB__Syms; + +class VbibpTB___024root final : public VerilatedModule { + public: + + // DESIGN SPECIFIC STATE + CData/*0:0*/ __VactContinue; + SData/*10:0*/ bibpTB__DOT__buyruk; + IData/*31:0*/ __VstlIterCount; + IData/*31:0*/ __VactIterCount; + VlDelayScheduler __VdlySched; + VlTriggerVec<1> __VstlTriggered; + VlTriggerVec<1> __VactTriggered; + VlTriggerVec<1> __VnbaTriggered; + + // INTERNAL VARIABLES + VbibpTB__Syms* const vlSymsp; + + // CONSTRUCTORS + VbibpTB___024root(VbibpTB__Syms* symsp, const char* v__name); + ~VbibpTB___024root(); + VL_UNCOPYABLE(VbibpTB___024root); + + // INTERNAL METHODS + void __Vconfigure(bool first); +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + + +#endif // guard diff --git a/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h31122c8e__0.cpp b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h31122c8e__0.cpp new file mode 100644 index 0000000..c7f43b5 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h31122c8e__0.cpp @@ -0,0 +1,180 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See VbibpTB.h for the primary calling header + +#include "verilated.h" + +#include "VbibpTB___024root.h" + +VlCoroutine VbibpTB___024root___eval_initial__TOP__0(VbibpTB___024root* vlSelf); + +void VbibpTB___024root___eval_initial(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_initial\n"); ); + // Body + VbibpTB___024root___eval_initial__TOP__0(vlSelf); +} + +VL_INLINE_OPT void VbibpTB___024root___act_sequent__TOP__0(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___act_sequent__TOP__0\n"); ); + // Init + CData/*4:0*/ bibpTB__DOT__sonuc; + bibpTB__DOT__sonuc = 0; + // Body + VL_WRITEF("%2#\n%2#\n%2#\n",4,(0xfU & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)), + 4,(0xfU & (IData)(vlSelf->bibpTB__DOT__buyruk)), + 4,(0xfU & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) - (IData)(vlSelf->bibpTB__DOT__buyruk)))); + bibpTB__DOT__sonuc = ((0x400U & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? 0x1fU : (0x1fU & ((0x200U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? ( + (0x100U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? 0x1fU + : + ((0x80U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? 0x1fU + : + ((0xfU + & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)) + ^ + (0xfU + & (IData)(vlSelf->bibpTB__DOT__buyruk))))) + : ( + (0x100U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? + ((0x80U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? + (0xfU + & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) + | (IData)(vlSelf->bibpTB__DOT__buyruk))) + : + (0xfU + & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) + & (IData)(vlSelf->bibpTB__DOT__buyruk)))) + : + ((0x80U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? + ((0xfU + & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)) + - + (0xfU + & (IData)(vlSelf->bibpTB__DOT__buyruk))) + : + ((0xfU + & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)) + + + (0xfU + & (IData)(vlSelf->bibpTB__DOT__buyruk)))))))); + VL_WRITEF("%2#\n",5,bibpTB__DOT__sonuc); +} + +void VbibpTB___024root___eval_act(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_act\n"); ); + // Body + if (vlSelf->__VactTriggered.at(0U)) { + VbibpTB___024root___act_sequent__TOP__0(vlSelf); + } +} + +void VbibpTB___024root___eval_nba(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_nba\n"); ); + // Body + if (vlSelf->__VnbaTriggered.at(0U)) { + VbibpTB___024root___act_sequent__TOP__0(vlSelf); + } +} + +void VbibpTB___024root___eval_triggers__act(VbibpTB___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__act(VbibpTB___024root* vlSelf); +#endif // VL_DEBUG +void VbibpTB___024root___timing_resume(VbibpTB___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__nba(VbibpTB___024root* vlSelf); +#endif // VL_DEBUG + +void VbibpTB___024root___eval(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval\n"); ); + // Init + VlTriggerVec<1> __VpreTriggered; + IData/*31:0*/ __VnbaIterCount; + CData/*0:0*/ __VnbaContinue; + // Body + __VnbaIterCount = 0U; + __VnbaContinue = 1U; + while (__VnbaContinue) { + __VnbaContinue = 0U; + vlSelf->__VnbaTriggered.clear(); + vlSelf->__VactIterCount = 0U; + vlSelf->__VactContinue = 1U; + while (vlSelf->__VactContinue) { + vlSelf->__VactContinue = 0U; + VbibpTB___024root___eval_triggers__act(vlSelf); + if (vlSelf->__VactTriggered.any()) { + vlSelf->__VactContinue = 1U; + if (VL_UNLIKELY((0x64U < vlSelf->__VactIterCount))) { +#ifdef VL_DEBUG + VbibpTB___024root___dump_triggers__act(vlSelf); +#endif + VL_FATAL_MT("bibpTB.v", 1, "", "Active region did not converge."); + } + vlSelf->__VactIterCount = ((IData)(1U) + + vlSelf->__VactIterCount); + __VpreTriggered.andNot(vlSelf->__VactTriggered, vlSelf->__VnbaTriggered); + vlSelf->__VnbaTriggered.set(vlSelf->__VactTriggered); + VbibpTB___024root___timing_resume(vlSelf); + VbibpTB___024root___eval_act(vlSelf); + } + } + if (vlSelf->__VnbaTriggered.any()) { + __VnbaContinue = 1U; + if (VL_UNLIKELY((0x64U < __VnbaIterCount))) { +#ifdef VL_DEBUG + VbibpTB___024root___dump_triggers__nba(vlSelf); +#endif + VL_FATAL_MT("bibpTB.v", 1, "", "NBA region did not converge."); + } + __VnbaIterCount = ((IData)(1U) + __VnbaIterCount); + VbibpTB___024root___eval_nba(vlSelf); + } + } +} + +void VbibpTB___024root___timing_resume(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___timing_resume\n"); ); + // Body + if (vlSelf->__VactTriggered.at(0U)) { + vlSelf->__VdlySched.resume(); + } +} + +#ifdef VL_DEBUG +void VbibpTB___024root___eval_debug_assertions(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_debug_assertions\n"); ); +} +#endif // VL_DEBUG diff --git a/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h31122c8e__0__Slow.cpp b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h31122c8e__0__Slow.cpp new file mode 100644 index 0000000..6ff6664 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h31122c8e__0__Slow.cpp @@ -0,0 +1,117 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See VbibpTB.h for the primary calling header + +#include "verilated.h" + +#include "VbibpTB___024root.h" + +VL_ATTR_COLD void VbibpTB___024root___eval_static(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_static\n"); ); +} + +VL_ATTR_COLD void VbibpTB___024root___eval_final(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_final\n"); ); +} + +VL_ATTR_COLD void VbibpTB___024root___eval_triggers__stl(VbibpTB___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__stl(VbibpTB___024root* vlSelf); +#endif // VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___eval_stl(VbibpTB___024root* vlSelf); + +VL_ATTR_COLD void VbibpTB___024root___eval_settle(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_settle\n"); ); + // Init + CData/*0:0*/ __VstlContinue; + // Body + vlSelf->__VstlIterCount = 0U; + __VstlContinue = 1U; + while (__VstlContinue) { + __VstlContinue = 0U; + VbibpTB___024root___eval_triggers__stl(vlSelf); + if (vlSelf->__VstlTriggered.any()) { + __VstlContinue = 1U; + if (VL_UNLIKELY((0x64U < vlSelf->__VstlIterCount))) { +#ifdef VL_DEBUG + VbibpTB___024root___dump_triggers__stl(vlSelf); +#endif + VL_FATAL_MT("bibpTB.v", 1, "", "Settle region did not converge."); + } + vlSelf->__VstlIterCount = ((IData)(1U) + + vlSelf->__VstlIterCount); + VbibpTB___024root___eval_stl(vlSelf); + } + } +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__stl(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___dump_triggers__stl\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VstlTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VstlTriggered.at(0U)) { + VL_DBG_MSGF(" 'stl' region trigger index 0 is active: Internal 'stl' trigger - first iteration\n"); + } +} +#endif // VL_DEBUG + +void VbibpTB___024root___act_sequent__TOP__0(VbibpTB___024root* vlSelf); + +VL_ATTR_COLD void VbibpTB___024root___eval_stl(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_stl\n"); ); + // Body + if (vlSelf->__VstlTriggered.at(0U)) { + VbibpTB___024root___act_sequent__TOP__0(vlSelf); + } +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__act(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___dump_triggers__act\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VactTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VactTriggered.at(0U)) { + VL_DBG_MSGF(" 'act' region trigger index 0 is active: @([true] __VdlySched.awaitingCurrentTime())\n"); + } +} +#endif // VL_DEBUG + +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__nba(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___dump_triggers__nba\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VnbaTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VnbaTriggered.at(0U)) { + VL_DBG_MSGF(" 'nba' region trigger index 0 is active: @([true] __VdlySched.awaitingCurrentTime())\n"); + } +} +#endif // VL_DEBUG + +VL_ATTR_COLD void VbibpTB___024root___ctor_var_reset(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___ctor_var_reset\n"); ); + // Body + vlSelf->bibpTB__DOT__buyruk = VL_RAND_RESET_I(11); + } diff --git a/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h7f8acf28__0.cpp b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h7f8acf28__0.cpp new file mode 100644 index 0000000..0a8d31a --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h7f8acf28__0.cpp @@ -0,0 +1,43 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See VbibpTB.h for the primary calling header + +#include "verilated.h" + +#include "VbibpTB__Syms.h" +#include "VbibpTB___024root.h" + +VL_INLINE_OPT VlCoroutine VbibpTB___024root___eval_initial__TOP__0(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_initial__TOP__0\n"); ); + // Init + VlWide<3>/*95:0*/ __Vtemp_h84e83511__0; + // Body + __Vtemp_h84e83511__0[0U] = 0x2e766364U; + __Vtemp_h84e83511__0[1U] = 0x62696270U; + __Vtemp_h84e83511__0[2U] = 0x76U; + vlSymsp->_vm_contextp__->dumpfile(VL_CVT_PACK_STR_NW(3, __Vtemp_h84e83511__0)); + VL_PRINTF_MT("-Info: bibpTB.v:11: $dumpvar ignored, as Verilated without --trace\n"); + vlSelf->bibpTB__DOT__buyruk = 0x154U; + co_await vlSelf->__VdlySched.delay(0xaU, "bibpTB.v", + 13); + VL_FINISH_MT("bibpTB.v", 14, ""); +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__act(VbibpTB___024root* vlSelf); +#endif // VL_DEBUG + +void VbibpTB___024root___eval_triggers__act(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_triggers__act\n"); ); + // Body + vlSelf->__VactTriggered.at(0U) = vlSelf->__VdlySched.awaitingCurrentTime(); +#ifdef VL_DEBUG + if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) { + VbibpTB___024root___dump_triggers__act(vlSelf); + } +#endif +} diff --git a/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h7f8acf28__0__Slow.cpp b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h7f8acf28__0__Slow.cpp new file mode 100644 index 0000000..5a6eb8b --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB___024root__DepSet_h7f8acf28__0__Slow.cpp @@ -0,0 +1,25 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See VbibpTB.h for the primary calling header + +#include "verilated.h" + +#include "VbibpTB__Syms.h" +#include "VbibpTB___024root.h" + +#ifdef VL_DEBUG +VL_ATTR_COLD void VbibpTB___024root___dump_triggers__stl(VbibpTB___024root* vlSelf); +#endif // VL_DEBUG + +VL_ATTR_COLD void VbibpTB___024root___eval_triggers__stl(VbibpTB___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + VbibpTB__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ VbibpTB___024root___eval_triggers__stl\n"); ); + // Body + vlSelf->__VstlTriggered.at(0U) = (0U == vlSelf->__VstlIterCount); +#ifdef VL_DEBUG + if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) { + VbibpTB___024root___dump_triggers__stl(vlSelf); + } +#endif +} diff --git a/labs/lab6/obj_dir/VbibpTB___024root__Slow.cpp b/labs/lab6/obj_dir/VbibpTB___024root__Slow.cpp new file mode 100644 index 0000000..1f968a1 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB___024root__Slow.cpp @@ -0,0 +1,26 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See VbibpTB.h for the primary calling header + +#include "verilated.h" + +#include "VbibpTB__Syms.h" +#include "VbibpTB___024root.h" + +void VbibpTB___024root___ctor_var_reset(VbibpTB___024root* vlSelf); + +VbibpTB___024root::VbibpTB___024root(VbibpTB__Syms* symsp, const char* v__name) + : VerilatedModule{v__name} + , __VdlySched{*symsp->_vm_contextp__} + , vlSymsp{symsp} + { + // Reset structure values + VbibpTB___024root___ctor_var_reset(this); +} + +void VbibpTB___024root::__Vconfigure(bool first) { + if (false && first) {} // Prevent unused +} + +VbibpTB___024root::~VbibpTB___024root() { +} diff --git a/labs/lab6/obj_dir/VbibpTB__main.cpp b/labs/lab6/obj_dir/VbibpTB__main.cpp new file mode 100644 index 0000000..be832e7 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB__main.cpp @@ -0,0 +1,34 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: main() calling loop, created with Verilator --main + +#include "verilated.h" +#include "VbibpTB.h" + +//====================== + +int main(int argc, char** argv, char**) { + // Setup context, defaults, and parse command line + Verilated::debug(0); + const std::unique_ptr contextp{new VerilatedContext}; + contextp->commandArgs(argc, argv); + + // Construct the Verilated model, from Vtop.h generated from Verilating + const std::unique_ptr topp{new VbibpTB{contextp.get()}}; + + // Simulate until $finish + while (!contextp->gotFinish()) { + // Evaluate model + topp->eval(); + // Advance time + if (!topp->eventsPending()) break; + contextp->time(topp->nextTimeSlot()); + } + + if (!contextp->gotFinish()) { + VL_DEBUG_IF(VL_PRINTF("+ Exiting without $finish; no events left\n");); + } + + // Final model cleanup + topp->final(); + return 0; +} diff --git a/labs/lab6/obj_dir/VbibpTB_classes.mk b/labs/lab6/obj_dir/VbibpTB_classes.mk new file mode 100644 index 0000000..a27c000 --- /dev/null +++ b/labs/lab6/obj_dir/VbibpTB_classes.mk @@ -0,0 +1,54 @@ +# Verilated -*- Makefile -*- +# DESCRIPTION: Verilator output: Make include file with class lists +# +# This file lists generated Verilated files, for including in higher level makefiles. +# See VbibpTB.mk for the caller. + +### Switches... +# C11 constructs required? 0/1 (always on now) +VM_C11 = 1 +# Timing enabled? 0/1 +VM_TIMING = 1 +# Coverage output mode? 0/1 (from --coverage) +VM_COVERAGE = 0 +# Parallel builds? 0/1 (from --output-split) +VM_PARALLEL_BUILDS = 0 +# Tracing output mode? 0/1 (from --trace/--trace-fst) +VM_TRACE = 0 +# Tracing output mode in VCD format? 0/1 (from --trace) +VM_TRACE_VCD = 0 +# Tracing output mode in FST format? 0/1 (from --trace-fst) +VM_TRACE_FST = 0 + +### Object file lists... +# Generated module classes, fast-path, compile with highest optimization +VM_CLASSES_FAST += \ + VbibpTB \ + VbibpTB___024root__DepSet_h7f8acf28__0 \ + VbibpTB___024root__DepSet_h31122c8e__0 \ + VbibpTB__main \ + +# Generated module classes, non-fast-path, compile with low/medium optimization +VM_CLASSES_SLOW += \ + VbibpTB___024root__Slow \ + VbibpTB___024root__DepSet_h7f8acf28__0__Slow \ + VbibpTB___024root__DepSet_h31122c8e__0__Slow \ + +# Generated support classes, fast-path, compile with highest optimization +VM_SUPPORT_FAST += \ + +# Generated support classes, non-fast-path, compile with low/medium optimization +VM_SUPPORT_SLOW += \ + VbibpTB__Syms \ + +# Global classes, need linked once per executable, fast-path, compile with highest optimization +VM_GLOBAL_FAST += \ + verilated \ + verilated_timing \ + verilated_threads \ + +# Global classes, need linked once per executable, non-fast-path, compile with low/medium optimization +VM_GLOBAL_SLOW += \ + + +# Verilated -*- Makefile -*- diff --git a/labs/lab6/obj_dir/Vbibp__ALL.a b/labs/lab6/obj_dir/Vbibp__ALL.a new file mode 100644 index 0000000..25cfc5f Binary files /dev/null and b/labs/lab6/obj_dir/Vbibp__ALL.a differ diff --git a/labs/lab6/obj_dir/Vbibp__ALL.cpp b/labs/lab6/obj_dir/Vbibp__ALL.cpp new file mode 100644 index 0000000..bf07c30 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__ALL.cpp @@ -0,0 +1,10 @@ +// DESCRIPTION: Generated by verilator_includer via makefile +#define VL_INCLUDE_OPT include +#include "Vbibp.cpp" +#include "Vbibp___024root__DepSet_h1791c79f__0.cpp" +#include "Vbibp___024root__DepSet_h1fed60c4__0.cpp" +#include "Vbibp__main.cpp" +#include "Vbibp___024root__Slow.cpp" +#include "Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp" +#include "Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp" +#include "Vbibp__Syms.cpp" diff --git a/labs/lab6/obj_dir/Vbibp__ALL.d b/labs/lab6/obj_dir/Vbibp__ALL.d new file mode 100644 index 0000000..3e66b7b --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__ALL.d @@ -0,0 +1,12 @@ +Vbibp__ALL.o: Vbibp__ALL.cpp Vbibp.cpp Vbibp.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h Vbibp__Syms.h \ + Vbibp___024root.h /usr/share/verilator/include/verilated_timing.h \ + /usr/share/verilator/include/verilated.h \ + Vbibp___024root__DepSet_h1791c79f__0.cpp \ + Vbibp___024root__DepSet_h1fed60c4__0.cpp Vbibp__main.cpp \ + Vbibp___024root__Slow.cpp Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp \ + Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp Vbibp__Syms.cpp diff --git a/labs/lab6/obj_dir/Vbibp__ALL.o b/labs/lab6/obj_dir/Vbibp__ALL.o new file mode 100644 index 0000000..d5c3254 Binary files /dev/null and b/labs/lab6/obj_dir/Vbibp__ALL.o differ diff --git a/labs/lab6/obj_dir/Vbibp__Syms.cpp b/labs/lab6/obj_dir/Vbibp__Syms.cpp new file mode 100644 index 0000000..0e513f4 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__Syms.cpp @@ -0,0 +1,26 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Symbol table implementation internals + +#include "Vbibp__Syms.h" +#include "Vbibp.h" +#include "Vbibp___024root.h" + +// FUNCTIONS +Vbibp__Syms::~Vbibp__Syms() +{ +} + +Vbibp__Syms::Vbibp__Syms(VerilatedContext* contextp, const char* namep, Vbibp* modelp) + : VerilatedSyms{contextp} + // Setup internal state of the Syms class + , __Vm_modelp{modelp} + // Setup module instances + , TOP{this, namep} +{ + // Configure time unit / time precision + _vm_contextp__->timeunit(-12); + _vm_contextp__->timeprecision(-12); + // Setup each module's pointers to their submodules + // Setup each module's pointer back to symbol table (for public functions) + TOP.__Vconfigure(true); +} diff --git a/labs/lab6/obj_dir/Vbibp__Syms.h b/labs/lab6/obj_dir/Vbibp__Syms.h new file mode 100644 index 0000000..3f86537 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__Syms.h @@ -0,0 +1,37 @@ +// 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 VERILATED_VBIBP__SYMS_H_ +#define VERILATED_VBIBP__SYMS_H_ // guard + +#include "verilated.h" + +// INCLUDE MODEL CLASS + +#include "Vbibp.h" + +// INCLUDE MODULE CLASSES +#include "Vbibp___024root.h" + +// SYMS CLASS (contains all model state) +class Vbibp__Syms final : public VerilatedSyms { + public: + // INTERNAL STATE + Vbibp* const __Vm_modelp; + bool __Vm_didInit = false; + + // MODULE INSTANCE STATE + Vbibp___024root TOP; + + // CONSTRUCTORS + Vbibp__Syms(VerilatedContext* contextp, const char* namep, Vbibp* modelp); + ~Vbibp__Syms(); + + // METHODS + const char* name() { return TOP.name(); } +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + +#endif // guard diff --git a/labs/lab6/obj_dir/Vbibp___024root.h b/labs/lab6/obj_dir/Vbibp___024root.h new file mode 100644 index 0000000..10cfdb4 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp___024root.h @@ -0,0 +1,39 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design internal header +// See Vbibp.h for the primary calling header + +#ifndef VERILATED_VBIBP___024ROOT_H_ +#define VERILATED_VBIBP___024ROOT_H_ // guard + +#include "verilated.h" +#include "verilated_timing.h" + +class Vbibp__Syms; + +class Vbibp___024root final : public VerilatedModule { + public: + + // DESIGN SPECIFIC STATE + CData/*0:0*/ __VactContinue; + SData/*10:0*/ bibpTB__DOT__buyruk; + IData/*31:0*/ __VstlIterCount; + IData/*31:0*/ __VactIterCount; + VlDelayScheduler __VdlySched; + VlTriggerVec<1> __VstlTriggered; + VlTriggerVec<1> __VactTriggered; + VlTriggerVec<1> __VnbaTriggered; + + // INTERNAL VARIABLES + Vbibp__Syms* const vlSymsp; + + // CONSTRUCTORS + Vbibp___024root(Vbibp__Syms* symsp, const char* v__name); + ~Vbibp___024root(); + VL_UNCOPYABLE(Vbibp___024root); + + // INTERNAL METHODS + void __Vconfigure(bool first); +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + + +#endif // guard diff --git a/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1791c79f__0.cpp b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1791c79f__0.cpp new file mode 100644 index 0000000..bf5427b --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1791c79f__0.cpp @@ -0,0 +1,43 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vbibp.h for the primary calling header + +#include "verilated.h" + +#include "Vbibp__Syms.h" +#include "Vbibp___024root.h" + +VL_INLINE_OPT VlCoroutine Vbibp___024root___eval_initial__TOP__0(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_initial__TOP__0\n"); ); + // Init + VlWide<3>/*95:0*/ __Vtemp_h84e83511__0; + // Body + __Vtemp_h84e83511__0[0U] = 0x2e766364U; + __Vtemp_h84e83511__0[1U] = 0x62696270U; + __Vtemp_h84e83511__0[2U] = 0x76U; + vlSymsp->_vm_contextp__->dumpfile(VL_CVT_PACK_STR_NW(3, __Vtemp_h84e83511__0)); + VL_PRINTF_MT("-Info: bibpTB.v:11: $dumpvar ignored, as Verilated without --trace\n"); + vlSelf->bibpTB__DOT__buyruk = 0x754U; + co_await vlSelf->__VdlySched.delay(0xaU, "bibpTB.v", + 13); + VL_FINISH_MT("bibpTB.v", 14, ""); +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__act(Vbibp___024root* vlSelf); +#endif // VL_DEBUG + +void Vbibp___024root___eval_triggers__act(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_triggers__act\n"); ); + // Body + vlSelf->__VactTriggered.at(0U) = vlSelf->__VdlySched.awaitingCurrentTime(); +#ifdef VL_DEBUG + if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) { + Vbibp___024root___dump_triggers__act(vlSelf); + } +#endif +} diff --git a/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp new file mode 100644 index 0000000..3acf800 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp @@ -0,0 +1,25 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vbibp.h for the primary calling header + +#include "verilated.h" + +#include "Vbibp__Syms.h" +#include "Vbibp___024root.h" + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__stl(Vbibp___024root* vlSelf); +#endif // VL_DEBUG + +VL_ATTR_COLD void Vbibp___024root___eval_triggers__stl(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_triggers__stl\n"); ); + // Body + vlSelf->__VstlTriggered.at(0U) = (0U == vlSelf->__VstlIterCount); +#ifdef VL_DEBUG + if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) { + Vbibp___024root___dump_triggers__stl(vlSelf); + } +#endif +} diff --git a/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1fed60c4__0.cpp b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1fed60c4__0.cpp new file mode 100644 index 0000000..ff5832d --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1fed60c4__0.cpp @@ -0,0 +1,163 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vbibp.h for the primary calling header + +#include "verilated.h" + +#include "Vbibp___024root.h" + +VlCoroutine Vbibp___024root___eval_initial__TOP__0(Vbibp___024root* vlSelf); + +void Vbibp___024root___eval_initial(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_initial\n"); ); + // Body + Vbibp___024root___eval_initial__TOP__0(vlSelf); +} + +VL_INLINE_OPT void Vbibp___024root___act_sequent__TOP__0(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___act_sequent__TOP__0\n"); ); + // Init + CData/*4:0*/ bibpTB__DOT__sonuc; + bibpTB__DOT__sonuc = 0; + // Body + VL_WRITEF("%2#\n%2#\n%2#\n",4,(0xfU & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)), + 4,(0xfU & (IData)(vlSelf->bibpTB__DOT__buyruk)), + 4,(0xfU & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) - (IData)(vlSelf->bibpTB__DOT__buyruk)))); + bibpTB__DOT__sonuc = (0x1fU & ((0x400U & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? ((0x200U & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? 0x1fU : ( + (0x100U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? 0x1fU + : + (0xfU + & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) + ^ (IData)(vlSelf->bibpTB__DOT__buyruk))))) + : ((0x200U & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? ((0x100U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? (0xfU + & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) + | (IData)(vlSelf->bibpTB__DOT__buyruk))) + : (0xfU + & (((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U) + & (IData)(vlSelf->bibpTB__DOT__buyruk)))) + : ((0x100U + & (IData)(vlSelf->bibpTB__DOT__buyruk)) + ? ((0xfU + & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)) + - (0xfU + & (IData)(vlSelf->bibpTB__DOT__buyruk))) + : ((0xfU + & ((IData)(vlSelf->bibpTB__DOT__buyruk) + >> 4U)) + + (0xfU + & (IData)(vlSelf->bibpTB__DOT__buyruk))))))); + VL_WRITEF("%b\n",5,bibpTB__DOT__sonuc); +} + +void Vbibp___024root___eval_act(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_act\n"); ); + // Body + if (vlSelf->__VactTriggered.at(0U)) { + Vbibp___024root___act_sequent__TOP__0(vlSelf); + } +} + +void Vbibp___024root___eval_nba(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_nba\n"); ); + // Body + if (vlSelf->__VnbaTriggered.at(0U)) { + Vbibp___024root___act_sequent__TOP__0(vlSelf); + } +} + +void Vbibp___024root___eval_triggers__act(Vbibp___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__act(Vbibp___024root* vlSelf); +#endif // VL_DEBUG +void Vbibp___024root___timing_resume(Vbibp___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__nba(Vbibp___024root* vlSelf); +#endif // VL_DEBUG + +void Vbibp___024root___eval(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval\n"); ); + // Init + VlTriggerVec<1> __VpreTriggered; + IData/*31:0*/ __VnbaIterCount; + CData/*0:0*/ __VnbaContinue; + // Body + __VnbaIterCount = 0U; + __VnbaContinue = 1U; + while (__VnbaContinue) { + __VnbaContinue = 0U; + vlSelf->__VnbaTriggered.clear(); + vlSelf->__VactIterCount = 0U; + vlSelf->__VactContinue = 1U; + while (vlSelf->__VactContinue) { + vlSelf->__VactContinue = 0U; + Vbibp___024root___eval_triggers__act(vlSelf); + if (vlSelf->__VactTriggered.any()) { + vlSelf->__VactContinue = 1U; + if (VL_UNLIKELY((0x64U < vlSelf->__VactIterCount))) { +#ifdef VL_DEBUG + Vbibp___024root___dump_triggers__act(vlSelf); +#endif + VL_FATAL_MT("bibpTB.v", 1, "", "Active region did not converge."); + } + vlSelf->__VactIterCount = ((IData)(1U) + + vlSelf->__VactIterCount); + __VpreTriggered.andNot(vlSelf->__VactTriggered, vlSelf->__VnbaTriggered); + vlSelf->__VnbaTriggered.set(vlSelf->__VactTriggered); + Vbibp___024root___timing_resume(vlSelf); + Vbibp___024root___eval_act(vlSelf); + } + } + if (vlSelf->__VnbaTriggered.any()) { + __VnbaContinue = 1U; + if (VL_UNLIKELY((0x64U < __VnbaIterCount))) { +#ifdef VL_DEBUG + Vbibp___024root___dump_triggers__nba(vlSelf); +#endif + VL_FATAL_MT("bibpTB.v", 1, "", "NBA region did not converge."); + } + __VnbaIterCount = ((IData)(1U) + __VnbaIterCount); + Vbibp___024root___eval_nba(vlSelf); + } + } +} + +void Vbibp___024root___timing_resume(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___timing_resume\n"); ); + // Body + if (vlSelf->__VactTriggered.at(0U)) { + vlSelf->__VdlySched.resume(); + } +} + +#ifdef VL_DEBUG +void Vbibp___024root___eval_debug_assertions(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_debug_assertions\n"); ); +} +#endif // VL_DEBUG diff --git a/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp new file mode 100644 index 0000000..6da44f6 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp @@ -0,0 +1,117 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vbibp.h for the primary calling header + +#include "verilated.h" + +#include "Vbibp___024root.h" + +VL_ATTR_COLD void Vbibp___024root___eval_static(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_static\n"); ); +} + +VL_ATTR_COLD void Vbibp___024root___eval_final(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_final\n"); ); +} + +VL_ATTR_COLD void Vbibp___024root___eval_triggers__stl(Vbibp___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__stl(Vbibp___024root* vlSelf); +#endif // VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___eval_stl(Vbibp___024root* vlSelf); + +VL_ATTR_COLD void Vbibp___024root___eval_settle(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_settle\n"); ); + // Init + CData/*0:0*/ __VstlContinue; + // Body + vlSelf->__VstlIterCount = 0U; + __VstlContinue = 1U; + while (__VstlContinue) { + __VstlContinue = 0U; + Vbibp___024root___eval_triggers__stl(vlSelf); + if (vlSelf->__VstlTriggered.any()) { + __VstlContinue = 1U; + if (VL_UNLIKELY((0x64U < vlSelf->__VstlIterCount))) { +#ifdef VL_DEBUG + Vbibp___024root___dump_triggers__stl(vlSelf); +#endif + VL_FATAL_MT("bibpTB.v", 1, "", "Settle region did not converge."); + } + vlSelf->__VstlIterCount = ((IData)(1U) + + vlSelf->__VstlIterCount); + Vbibp___024root___eval_stl(vlSelf); + } + } +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__stl(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___dump_triggers__stl\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VstlTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VstlTriggered.at(0U)) { + VL_DBG_MSGF(" 'stl' region trigger index 0 is active: Internal 'stl' trigger - first iteration\n"); + } +} +#endif // VL_DEBUG + +void Vbibp___024root___act_sequent__TOP__0(Vbibp___024root* vlSelf); + +VL_ATTR_COLD void Vbibp___024root___eval_stl(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___eval_stl\n"); ); + // Body + if (vlSelf->__VstlTriggered.at(0U)) { + Vbibp___024root___act_sequent__TOP__0(vlSelf); + } +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__act(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___dump_triggers__act\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VactTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VactTriggered.at(0U)) { + VL_DBG_MSGF(" 'act' region trigger index 0 is active: @([true] __VdlySched.awaitingCurrentTime())\n"); + } +} +#endif // VL_DEBUG + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vbibp___024root___dump_triggers__nba(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___dump_triggers__nba\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VnbaTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VnbaTriggered.at(0U)) { + VL_DBG_MSGF(" 'nba' region trigger index 0 is active: @([true] __VdlySched.awaitingCurrentTime())\n"); + } +} +#endif // VL_DEBUG + +VL_ATTR_COLD void Vbibp___024root___ctor_var_reset(Vbibp___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vbibp__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vbibp___024root___ctor_var_reset\n"); ); + // Body + vlSelf->bibpTB__DOT__buyruk = VL_RAND_RESET_I(11); + } diff --git a/labs/lab6/obj_dir/Vbibp___024root__Slow.cpp b/labs/lab6/obj_dir/Vbibp___024root__Slow.cpp new file mode 100644 index 0000000..835e257 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp___024root__Slow.cpp @@ -0,0 +1,26 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vbibp.h for the primary calling header + +#include "verilated.h" + +#include "Vbibp__Syms.h" +#include "Vbibp___024root.h" + +void Vbibp___024root___ctor_var_reset(Vbibp___024root* vlSelf); + +Vbibp___024root::Vbibp___024root(Vbibp__Syms* symsp, const char* v__name) + : VerilatedModule{v__name} + , __VdlySched{*symsp->_vm_contextp__} + , vlSymsp{symsp} + { + // Reset structure values + Vbibp___024root___ctor_var_reset(this); +} + +void Vbibp___024root::__Vconfigure(bool first) { + if (false && first) {} // Prevent unused +} + +Vbibp___024root::~Vbibp___024root() { +} diff --git a/labs/lab6/obj_dir/Vbibp__main.cpp b/labs/lab6/obj_dir/Vbibp__main.cpp new file mode 100644 index 0000000..bb39653 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__main.cpp @@ -0,0 +1,34 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: main() calling loop, created with Verilator --main + +#include "verilated.h" +#include "Vbibp.h" + +//====================== + +int main(int argc, char** argv, char**) { + // Setup context, defaults, and parse command line + Verilated::debug(0); + const std::unique_ptr contextp{new VerilatedContext}; + contextp->commandArgs(argc, argv); + + // Construct the Verilated model, from Vtop.h generated from Verilating + const std::unique_ptr topp{new Vbibp{contextp.get()}}; + + // Simulate until $finish + while (!contextp->gotFinish()) { + // Evaluate model + topp->eval(); + // Advance time + if (!topp->eventsPending()) break; + contextp->time(topp->nextTimeSlot()); + } + + if (!contextp->gotFinish()) { + VL_DEBUG_IF(VL_PRINTF("+ Exiting without $finish; no events left\n");); + } + + // Final model cleanup + topp->final(); + return 0; +} diff --git a/labs/lab6/obj_dir/Vbibp__ver.d b/labs/lab6/obj_dir/Vbibp__ver.d new file mode 100644 index 0000000..d513013 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__ver.d @@ -0,0 +1 @@ +obj_dir/Vbibp.cpp obj_dir/Vbibp.h obj_dir/Vbibp.mk obj_dir/Vbibp__Syms.cpp obj_dir/Vbibp__Syms.h obj_dir/Vbibp___024root.h obj_dir/Vbibp___024root__DepSet_h1791c79f__0.cpp obj_dir/Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp obj_dir/Vbibp___024root__DepSet_h1fed60c4__0.cpp obj_dir/Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp obj_dir/Vbibp___024root__Slow.cpp obj_dir/Vbibp__main.cpp obj_dir/Vbibp__ver.d obj_dir/Vbibp_classes.mk : /usr/bin/verilator_bin /usr/bin/verilator_bin bibp.v bibpTB.v diff --git a/labs/lab6/obj_dir/Vbibp__verFiles.dat b/labs/lab6/obj_dir/Vbibp__verFiles.dat new file mode 100644 index 0000000..1157cf2 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp__verFiles.dat @@ -0,0 +1,20 @@ +# DESCRIPTION: Verilator output: Timestamp data for --skip-identical. Delete at will. +C "--binary bibp.v bibpTB.v" +S 12244816 28045 1719496600 881980186 1680199511 0 "/usr/bin/verilator_bin" +S 1391 45758 1720892163 82220690 1720892163 82220690 "bibp.v" +S 280 45770 1720891982 812222176 1720891982 812222176 "bibpTB.v" +T 2913 45968 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp.cpp" +T 2653 45967 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp.h" +T 1734 45977 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp.mk" +T 746 45965 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp__Syms.cpp" +T 902 45966 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp__Syms.h" +T 991 45969 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp___024root.h" +T 1689 45973 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp___024root__DepSet_h1791c79f__0.cpp" +T 843 45971 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp___024root__DepSet_h1791c79f__0__Slow.cpp" +T 7548 45974 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp___024root__DepSet_h1fed60c4__0.cpp" +T 4683 45972 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp___024root__DepSet_h1fed60c4__0__Slow.cpp" +T 668 45970 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp___024root__Slow.cpp" +T 961 45975 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp__main.cpp" +T 501 45978 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp__ver.d" +T 0 0 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp__verFiles.dat" +T 1664 45976 1720892165 682220680 1720892165 682220680 "obj_dir/Vbibp_classes.mk" diff --git a/labs/lab6/obj_dir/Vbibp_classes.mk b/labs/lab6/obj_dir/Vbibp_classes.mk new file mode 100644 index 0000000..09e1cc2 --- /dev/null +++ b/labs/lab6/obj_dir/Vbibp_classes.mk @@ -0,0 +1,54 @@ +# Verilated -*- Makefile -*- +# DESCRIPTION: Verilator output: Make include file with class lists +# +# This file lists generated Verilated files, for including in higher level makefiles. +# See Vbibp.mk for the caller. + +### Switches... +# C11 constructs required? 0/1 (always on now) +VM_C11 = 1 +# Timing enabled? 0/1 +VM_TIMING = 1 +# Coverage output mode? 0/1 (from --coverage) +VM_COVERAGE = 0 +# Parallel builds? 0/1 (from --output-split) +VM_PARALLEL_BUILDS = 0 +# Tracing output mode? 0/1 (from --trace/--trace-fst) +VM_TRACE = 0 +# Tracing output mode in VCD format? 0/1 (from --trace) +VM_TRACE_VCD = 0 +# Tracing output mode in FST format? 0/1 (from --trace-fst) +VM_TRACE_FST = 0 + +### Object file lists... +# Generated module classes, fast-path, compile with highest optimization +VM_CLASSES_FAST += \ + Vbibp \ + Vbibp___024root__DepSet_h1791c79f__0 \ + Vbibp___024root__DepSet_h1fed60c4__0 \ + Vbibp__main \ + +# Generated module classes, non-fast-path, compile with low/medium optimization +VM_CLASSES_SLOW += \ + Vbibp___024root__Slow \ + Vbibp___024root__DepSet_h1791c79f__0__Slow \ + Vbibp___024root__DepSet_h1fed60c4__0__Slow \ + +# Generated support classes, fast-path, compile with highest optimization +VM_SUPPORT_FAST += \ + +# Generated support classes, non-fast-path, compile with low/medium optimization +VM_SUPPORT_SLOW += \ + Vbibp__Syms \ + +# Global classes, need linked once per executable, fast-path, compile with highest optimization +VM_GLOBAL_FAST += \ + verilated \ + verilated_timing \ + verilated_threads \ + +# Global classes, need linked once per executable, non-fast-path, compile with low/medium optimization +VM_GLOBAL_SLOW += \ + + +# Verilated -*- Makefile -*- diff --git a/labs/lab6/obj_dir/verilated.d b/labs/lab6/obj_dir/verilated.d new file mode 100644 index 0000000..6ed3629 --- /dev/null +++ b/labs/lab6/obj_dir/verilated.d @@ -0,0 +1,12 @@ +verilated.o: /usr/share/verilator/include/verilated.cpp \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_imp.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h \ + /usr/share/verilator/include/verilated_syms.h \ + /usr/share/verilator/include/verilated_sym_props.h \ + /usr/share/verilator/include/verilated_threads.h \ + /usr/share/verilator/include/verilated_trace.h \ + /usr/share/verilator/include/verilated_trace_defs.h diff --git a/labs/lab6/obj_dir/verilated.o b/labs/lab6/obj_dir/verilated.o new file mode 100644 index 0000000..d7daedd Binary files /dev/null and b/labs/lab6/obj_dir/verilated.o differ diff --git a/labs/lab6/obj_dir/verilated_threads.d b/labs/lab6/obj_dir/verilated_threads.d new file mode 100644 index 0000000..a1b1a49 --- /dev/null +++ b/labs/lab6/obj_dir/verilated_threads.d @@ -0,0 +1,7 @@ +verilated_threads.o: /usr/share/verilator/include/verilated_threads.cpp \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_threads.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h diff --git a/labs/lab6/obj_dir/verilated_threads.o b/labs/lab6/obj_dir/verilated_threads.o new file mode 100644 index 0000000..bce79c7 Binary files /dev/null and b/labs/lab6/obj_dir/verilated_threads.o differ diff --git a/labs/lab6/obj_dir/verilated_timing.d b/labs/lab6/obj_dir/verilated_timing.d new file mode 100644 index 0000000..91d0e85 --- /dev/null +++ b/labs/lab6/obj_dir/verilated_timing.d @@ -0,0 +1,7 @@ +verilated_timing.o: /usr/share/verilator/include/verilated_timing.cpp \ + /usr/share/verilator/include/verilated_timing.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h diff --git a/labs/lab6/obj_dir/verilated_timing.o b/labs/lab6/obj_dir/verilated_timing.o new file mode 100644 index 0000000..61f79d6 Binary files /dev/null and b/labs/lab6/obj_dir/verilated_timing.o differ diff --git a/labs/lab6/vbibp.vcd b/labs/lab6/vbibp.vcd index c638d6a..524c6b8 100644 --- a/labs/lab6/vbibp.vcd +++ b/labs/lab6/vbibp.vcd @@ -1,5 +1,5 @@ $date - Sat Jul 13 00:01:24 2024 + Sat Jul 13 20:33:06 2024 $end $version Icarus Verilog @@ -18,9 +18,9 @@ $upscope $end $enddefinitions $end #0 $dumpvars -b100 $ -b101010100 # -b101010100 " -b100 ! +b11111 $ +b11101010100 # +b11101010100 " +b11111 ! $end #10 diff --git a/labs/lab6/vvbibp b/labs/lab6/vvbibp index 910f8e3..a2eec58 100644 --- a/labs/lab6/vvbibp +++ b/labs/lab6/vvbibp @@ -7,113 +7,116 @@ :vpi_module "/usr/lib/x86_64-linux-gnu/ivl/vhdl_textio.vpi"; :vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi"; :vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi"; -S_0x557dbd3f8cf0 .scope module, "bibpTB" "bibpTB" 2 1; +S_0x55b097fd0df0 .scope module, "bibpTB" "bibpTB" 2 1; .timescale 0 0; -P_0x557dbd3f8e80 .param/l "UZUNLUK" 0 2 3, +C4<00000000000000000000000000001000>; -v0x557dbd40a7d0_0 .var "buyruk", 10 0; -v0x557dbd40a890_0 .net "sonuc", 4 0, v0x557dbd40a690_0; 1 drivers -S_0x557dbd3f8f20 .scope module, "uut" "bibp" 2 7, 3 1 0, S_0x557dbd3f8cf0; +P_0x55b097fd1ec0 .param/l "UZUNLUK" 0 2 3, +C4<00000000000000000000000000001000>; +v0x55b098020f40_0 .var "buyruk", 10 0; +v0x55b098021030_0 .net "sonuc", 4 0, v0x55b098020e00_0; 1 drivers +S_0x55b097fd0fd0 .scope module, "uut" "bibp" 2 7, 3 1 0, S_0x55b097fd0df0; .timescale 0 0; .port_info 0 /INPUT 11 "buyruk"; .port_info 1 /OUTPUT 5 "sonuc"; -P_0x557dbd3f95c0 .param/l "UZUNLUK" 0 3 1, +C4<00000000000000000000000000001000>; -v0x557dbd3bbcf0_0 .net "buyruk", 10 0, v0x557dbd40a7d0_0; 1 drivers -v0x557dbd40a690_0 .var "sonuc", 4 0; -E_0x557dbd3bce20 .event edge, v0x557dbd3bbcf0_0; - .scope S_0x557dbd3f8f20; +P_0x55b097fd1de0 .param/l "UZUNLUK" 0 3 1, +C4<00000000000000000000000000001000>; +v0x55b09800a8e0_0 .net "buyruk", 10 0, v0x55b098020f40_0; 1 drivers +v0x55b098020e00_0 .var "sonuc", 4 0; +E_0x55b09800af00 .event edge, v0x55b09800a8e0_0, v0x55b098020e00_0; + .scope S_0x55b097fd0fd0; T_0 ; - %wait E_0x557dbd3bce20; - %load/vec4 v0x557dbd3bbcf0_0; - %parti/s 4, 7, 4; + %wait E_0x55b09800af00; + %vpi_call 3 21 "$display", "%d", &PV {0 0 0}; + %vpi_call 3 22 "$display", "%d", &PV {0 0 0}; + %load/vec4 v0x55b09800a8e0_0; + %parti/s 4, 4, 4; + %load/vec4 v0x55b09800a8e0_0; + %parti/s 4, 0, 2; + %sub; + %vpi_call 3 23 "$display", "%d", S<0,vec4,u4> {1 0 0}; + %load/vec4 v0x55b09800a8e0_0; + %parti/s 3, 8, 5; %dup/vec4; - %pushi/vec4 0, 0, 4; + %pushi/vec4 0, 0, 3; %cmp/u; %jmp/1 T_0.0, 6; %dup/vec4; - %pushi/vec4 1, 0, 4; + %pushi/vec4 1, 0, 3; %cmp/u; %jmp/1 T_0.1, 6; %dup/vec4; - %pushi/vec4 2, 0, 4; + %pushi/vec4 2, 0, 3; %cmp/u; %jmp/1 T_0.2, 6; %dup/vec4; - %pushi/vec4 3, 0, 4; + %pushi/vec4 3, 0, 3; %cmp/u; %jmp/1 T_0.3, 6; %dup/vec4; - %pushi/vec4 4, 0, 4; + %pushi/vec4 4, 0, 3; %cmp/u; %jmp/1 T_0.4, 6; - %load/vec4 v0x557dbd3bbcf0_0; - %parti/s 4, 4, 4; - %pad/u 5; - %load/vec4 v0x557dbd3bbcf0_0; - %parti/s 4, 0, 2; - %pad/u 5; - %add; - %store/vec4 v0x557dbd40a690_0, 0, 5; + %pushi/vec4 31, 0, 5; + %store/vec4 v0x55b098020e00_0, 0, 5; %jmp T_0.6; T_0.0 ; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 4, 4; %pad/u 5; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 0, 2; %pad/u 5; %add; - %store/vec4 v0x557dbd40a690_0, 0, 5; + %store/vec4 v0x55b098020e00_0, 0, 5; %jmp T_0.6; T_0.1 ; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 4, 4; %pad/u 5; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 0, 2; %pad/u 5; %sub; - %store/vec4 v0x557dbd40a690_0, 0, 5; + %store/vec4 v0x55b098020e00_0, 0, 5; %jmp T_0.6; T_0.2 ; - %load/vec4 v0x557dbd3bbcf0_0; + %pushi/vec4 0, 0, 1; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 4, 4; - %pad/u 5; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 0, 2; - %pad/u 5; %and; - %store/vec4 v0x557dbd40a690_0, 0, 5; + %concat/vec4; draw_concat_vec4 + %store/vec4 v0x55b098020e00_0, 0, 5; %jmp T_0.6; T_0.3 ; - %load/vec4 v0x557dbd3bbcf0_0; + %pushi/vec4 0, 0, 1; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 4, 4; - %pad/u 5; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 0, 2; - %pad/u 5; %or; - %store/vec4 v0x557dbd40a690_0, 0, 5; + %concat/vec4; draw_concat_vec4 + %store/vec4 v0x55b098020e00_0, 0, 5; %jmp T_0.6; T_0.4 ; - %load/vec4 v0x557dbd3bbcf0_0; + %pushi/vec4 0, 0, 1; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 4, 4; - %pad/u 5; - %load/vec4 v0x557dbd3bbcf0_0; + %load/vec4 v0x55b09800a8e0_0; %parti/s 4, 0, 2; - %pad/u 5; %xor; - %store/vec4 v0x557dbd40a690_0, 0, 5; + %concat/vec4; draw_concat_vec4 + %store/vec4 v0x55b098020e00_0, 0, 5; %jmp T_0.6; T_0.6 ; %pop/vec4 1; + %vpi_call 3 32 "$display", "%b", v0x55b098020e00_0 {0 0 0}; %jmp T_0; .thread T_0, $push; - .scope S_0x557dbd3f8cf0; + .scope S_0x55b097fd0df0; T_1 ; %vpi_call 2 10 "$dumpfile", "vbibp.vcd" {0 0 0}; %vpi_call 2 11 "$dumpvars" {0 0 0}; - %pushi/vec4 340, 0, 11; - %store/vec4 v0x557dbd40a7d0_0, 0, 11; + %pushi/vec4 1876, 0, 11; + %store/vec4 v0x55b098020f40_0, 0, 11; %delay 10, 0; %vpi_call 2 14 "$finish" {0 0 0}; %end; diff --git a/tetirs/a.out b/tetirs/a.out new file mode 100644 index 0000000..4bedd8f --- /dev/null +++ b/tetirs/a.out @@ -0,0 +1,202 @@ +#! /usr/bin/vvp +:ivl_version "11.0 (stable)"; +:ivl_delay_selection "TYPICAL"; +:vpi_time_precision + 0; +:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/system.vpi"; +:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/vhdl_sys.vpi"; +:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/vhdl_textio.vpi"; +:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi"; +:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi"; +S_0x5555993ec6a0 .scope module, "tb" "tb" 2 1; + .timescale 0 0; +v0x5555994063f0_0 .net "bitti_mi", 0 0, L_0x5555994068b0; 1 drivers +v0x5555994064b0_0 .net "cevrim", 4 0, L_0x5555994067c0; 1 drivers +v0x555599406550_0 .var "clk", 0 0; +v0x555599406650_0 .var "parca", 2 0; +v0x555599406720_0 .net "yukseklik", 4 0, v0x555599406270_0; 1 drivers +S_0x5555993ec830 .scope module, "uut" "tetris" 2 10, 3 1 0, S_0x5555993ec6a0; + .timescale 0 0; + .port_info 0 /INPUT 1 "clk"; + .port_info 1 /INPUT 3 "parca"; + .port_info 2 /OUTPUT 5 "yukseklik"; + .port_info 3 /OUTPUT 5 "cevrim"; + .port_info 4 /OUTPUT 1 "bitti_mi"; +L_0x5555994067c0 .functor BUFZ 5, v0x555599405d00_0, C4<00000>, C4<00000>, C4<00000>; +L_0x7f7b9f218018 .functor BUFT 1, C4<10000>, C4<0>, C4<0>, C4<0>; +v0x5555993ec9e0_0 .net/2u *"_ivl_2", 4 0, L_0x7f7b9f218018; 1 drivers +v0x555599405b80_0 .net "bitti_mi", 0 0, L_0x5555994068b0; alias, 1 drivers +v0x555599405c40_0 .net "cevrim", 4 0, L_0x5555994067c0; alias, 1 drivers +v0x555599405d00_0 .var "cevrim_r", 4 0; +v0x555599405de0_0 .net "clk", 0 0, v0x555599406550_0; 1 drivers +v0x555599405ef0_0 .net "parca", 2 0, v0x555599406650_0; 1 drivers +v0x555599405fd0_0 .var "y_0", 4 0; +v0x5555994060b0_0 .var "y_1", 4 0; +v0x555599406190_0 .var "y_2", 4 0; +v0x555599406270_0 .var "yukseklik", 4 0; +E_0x5555993e7d70 .event posedge, v0x555599405b80_0; +E_0x5555993af500 .event posedge, v0x555599405de0_0; +L_0x5555994068b0 .cmp/eq 5, v0x555599405d00_0, L_0x7f7b9f218018; + .scope S_0x5555993ec830; +T_0 ; + %pushi/vec4 0, 0, 5; + %store/vec4 v0x555599405d00_0, 0, 5; + %pushi/vec4 0, 0, 5; + %store/vec4 v0x555599405fd0_0, 0, 5; + %pushi/vec4 0, 0, 5; + %store/vec4 v0x5555994060b0_0, 0, 5; + %pushi/vec4 0, 0, 5; + %store/vec4 v0x555599406190_0, 0, 5; + %end; + .thread T_0; + .scope S_0x5555993ec830; +T_1 ; + %wait E_0x5555993af500; + %load/vec4 v0x555599405c40_0; + %cmpi/ne 16, 0, 5; + %jmp/0xz T_1.0, 4; + %load/vec4 v0x555599405d00_0; + %addi 1, 0, 5; + %assign/vec4 v0x555599405d00_0, 0; + %load/vec4 v0x555599405fd0_0; + %pushi/vec4 0, 0, 4; + %load/vec4 v0x555599405ef0_0; + %parti/s 1, 0, 2; + %concat/vec4; draw_concat_vec4 + %add; + %assign/vec4 v0x555599405fd0_0, 0; + %load/vec4 v0x5555994060b0_0; + %pushi/vec4 0, 0, 4; + %load/vec4 v0x555599405ef0_0; + %parti/s 1, 1, 2; + %concat/vec4; draw_concat_vec4 + %add; + %assign/vec4 v0x5555994060b0_0, 0; + %load/vec4 v0x555599406190_0; + %pushi/vec4 0, 0, 4; + %load/vec4 v0x555599405ef0_0; + %parti/s 1, 2, 3; + %concat/vec4; draw_concat_vec4 + %add; + %assign/vec4 v0x555599406190_0, 0; +T_1.0 ; + %jmp T_1; + .thread T_1; + .scope S_0x5555993ec830; +T_2 ; + %wait E_0x5555993e7d70; + %load/vec4 v0x5555994060b0_0; + %load/vec4 v0x555599405fd0_0; + %cmp/u; + %jmp/0xz T_2.0, 5; + %load/vec4 v0x555599406190_0; + %load/vec4 v0x555599405fd0_0; + %cmp/u; + %jmp/0xz T_2.2, 5; + %load/vec4 v0x555599405fd0_0; + %assign/vec4 v0x555599406270_0, 0; + %jmp T_2.3; +T_2.2 ; + %load/vec4 v0x555599406190_0; + %assign/vec4 v0x555599406270_0, 0; +T_2.3 ; + %jmp T_2.1; +T_2.0 ; + %load/vec4 v0x5555994060b0_0; + %load/vec4 v0x555599405fd0_0; + %cmp/u; + %jmp/0xz T_2.4, 5; + %load/vec4 v0x555599406190_0; + %load/vec4 v0x5555994060b0_0; + %cmp/u; + %jmp/0xz T_2.6, 5; + %load/vec4 v0x5555994060b0_0; + %assign/vec4 v0x555599406270_0, 0; + %jmp T_2.7; +T_2.6 ; + %load/vec4 v0x555599406190_0; + %assign/vec4 v0x555599406270_0, 0; +T_2.7 ; +T_2.4 ; +T_2.1 ; + %jmp T_2; + .thread T_2; + .scope S_0x5555993ec6a0; +T_3 ; + %pushi/vec4 0, 0, 1; + %store/vec4 v0x555599406550_0, 0, 1; + %end; + .thread T_3; + .scope S_0x5555993ec6a0; +T_4 ; + %load/vec4 v0x555599406550_0; + %inv; + %store/vec4 v0x555599406550_0, 0, 1; + %delay 5, 0; + %jmp T_4; + .thread T_4; + .scope S_0x5555993ec6a0; +T_5 ; + %vpi_call 2 23 "$dumpvars" {0 0 0}; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 5, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %pushi/vec4 0, 0, 3; + %store/vec4 v0x555599406650_0, 0, 3; + %delay 10, 0; + %vpi_call 2 42 "$finish" {0 0 0}; + %end; + .thread T_5; +# The file index is used to find the file name in the following table. +:file_names 4; + "N/A"; + ""; + "tb.v"; + "tetris.v"; diff --git a/tetirs/obj_dir/Vtb b/tetirs/obj_dir/Vtb new file mode 100644 index 0000000..38d5191 Binary files /dev/null and b/tetirs/obj_dir/Vtb differ diff --git a/tetirs/obj_dir/Vtb.cpp b/tetirs/obj_dir/Vtb.cpp new file mode 100644 index 0000000..ce98c5a --- /dev/null +++ b/tetirs/obj_dir/Vtb.cpp @@ -0,0 +1,92 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Model implementation (design independent parts) + +#include "Vtb.h" +#include "Vtb__Syms.h" + +//============================================================ +// Constructors + +Vtb::Vtb(VerilatedContext* _vcontextp__, const char* _vcname__) + : VerilatedModel{*_vcontextp__} + , vlSymsp{new Vtb__Syms(contextp(), _vcname__, this)} + , rootp{&(vlSymsp->TOP)} +{ + // Register model with the context + contextp()->addModel(this); +} + +Vtb::Vtb(const char* _vcname__) + : Vtb(Verilated::threadContextp(), _vcname__) +{ +} + +//============================================================ +// Destructor + +Vtb::~Vtb() { + delete vlSymsp; +} + +//============================================================ +// Evaluation function + +#ifdef VL_DEBUG +void Vtb___024root___eval_debug_assertions(Vtb___024root* vlSelf); +#endif // VL_DEBUG +void Vtb___024root___eval_static(Vtb___024root* vlSelf); +void Vtb___024root___eval_initial(Vtb___024root* vlSelf); +void Vtb___024root___eval_settle(Vtb___024root* vlSelf); +void Vtb___024root___eval(Vtb___024root* vlSelf); + +void Vtb::eval_step() { + VL_DEBUG_IF(VL_DBG_MSGF("+++++TOP Evaluate Vtb::eval_step\n"); ); +#ifdef VL_DEBUG + // Debug assertions + Vtb___024root___eval_debug_assertions(&(vlSymsp->TOP)); +#endif // VL_DEBUG + if (VL_UNLIKELY(!vlSymsp->__Vm_didInit)) { + vlSymsp->__Vm_didInit = true; + VL_DEBUG_IF(VL_DBG_MSGF("+ Initial\n");); + Vtb___024root___eval_static(&(vlSymsp->TOP)); + Vtb___024root___eval_initial(&(vlSymsp->TOP)); + Vtb___024root___eval_settle(&(vlSymsp->TOP)); + } + // MTask 0 start + VL_DEBUG_IF(VL_DBG_MSGF("MTask0 starting\n");); + Verilated::mtaskId(0); + VL_DEBUG_IF(VL_DBG_MSGF("+ Eval\n");); + Vtb___024root___eval(&(vlSymsp->TOP)); + // Evaluate cleanup + Verilated::endOfThreadMTask(vlSymsp->__Vm_evalMsgQp); + Verilated::endOfEval(vlSymsp->__Vm_evalMsgQp); +} + +//============================================================ +// Events and timing +bool Vtb::eventsPending() { return !vlSymsp->TOP.__VdlySched.empty(); } + +uint64_t Vtb::nextTimeSlot() { return vlSymsp->TOP.__VdlySched.nextTimeSlot(); } + +//============================================================ +// Utilities + +const char* Vtb::name() const { + return vlSymsp->name(); +} + +//============================================================ +// Invoke final blocks + +void Vtb___024root___eval_final(Vtb___024root* vlSelf); + +VL_ATTR_COLD void Vtb::final() { + Vtb___024root___eval_final(&(vlSymsp->TOP)); +} + +//============================================================ +// Implementations of abstract methods from VerilatedModel + +const char* Vtb::hierName() const { return vlSymsp->name(); } +const char* Vtb::modelName() const { return "Vtb"; } +unsigned Vtb::threads() const { return 1; } diff --git a/tetirs/obj_dir/Vtb.h b/tetirs/obj_dir/Vtb.h new file mode 100644 index 0000000..6cf8972 --- /dev/null +++ b/tetirs/obj_dir/Vtb.h @@ -0,0 +1,72 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Primary model header +// +// This header should be included by all source files instantiating the design. +// The class here is then constructed to instantiate the design. +// See the Verilator manual for examples. + +#ifndef VERILATED_VTB_H_ +#define VERILATED_VTB_H_ // guard + +#include "verilated.h" + +class Vtb__Syms; +class Vtb___024root; + +// This class is the main interface to the Verilated model +class Vtb VL_NOT_FINAL : public VerilatedModel { + private: + // Symbol table holding complete model state (owned by this class) + Vtb__Syms* const vlSymsp; + + public: + + // PORTS + // The application code writes and reads these signals to + // propagate new values into/out from the Verilated model. + + // CELLS + // Public to allow access to /* verilator public */ items. + // Otherwise the application code can consider these internals. + + // Root instance pointer to allow access to model internals, + // including inlined /* verilator public_flat_* */ items. + Vtb___024root* const rootp; + + // CONSTRUCTORS + /// Construct the model; called by application code + /// If contextp is null, then the model will use the default global context + /// If name is "", then makes a wrapper with a + /// single model invisible with respect to DPI scope names. + explicit Vtb(VerilatedContext* contextp, const char* name = "TOP"); + explicit Vtb(const char* name = "TOP"); + /// Destroy the model; called (often implicitly) by application code + virtual ~Vtb(); + private: + VL_UNCOPYABLE(Vtb); ///< Copying not allowed + + public: + // API METHODS + /// Evaluate the model. Application must call when inputs change. + void eval() { eval_step(); } + /// Evaluate when calling multiple units/models per time step. + void eval_step(); + /// Evaluate at end of a timestep for tracing, when using eval_step(). + /// Application must call after all eval() and before time changes. + void eval_end_step() {} + /// Simulation complete, run final blocks. Application must call on completion. + void final(); + /// Are there scheduled events to handle? + bool eventsPending(); + /// Returns time at next time slot. Aborts if !eventsPending() + uint64_t nextTimeSlot(); + /// Retrieve name of this model instance (as passed to constructor). + const char* name() const; + + // Abstract methods from VerilatedModel + const char* hierName() const override final; + const char* modelName() const override final; + unsigned threads() const override final; +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + +#endif // guard diff --git a/tetirs/obj_dir/Vtb.mk b/tetirs/obj_dir/Vtb.mk new file mode 100644 index 0000000..6435363 --- /dev/null +++ b/tetirs/obj_dir/Vtb.mk @@ -0,0 +1,65 @@ +# Verilated -*- Makefile -*- +# DESCRIPTION: Verilator output: Makefile for building Verilated archive or executable +# +# Execute this makefile from the object directory: +# make -f Vtb.mk + +default: Vtb + +### Constants... +# Perl executable (from $PERL) +PERL = perl +# Path to Verilator kit (from $VERILATOR_ROOT) +VERILATOR_ROOT = /usr/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... +# C++ code coverage 0/1 (from --prof-c) +VM_PROFC = 0 +# 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 +# Module prefix (from --prefix) +VM_MODPREFIX = Vtb +# User CFLAGS (from -CFLAGS on Verilator command line) +VM_USER_CFLAGS = \ + -DVL_TIME_CONTEXT \ + +# User LDLIBS (from -LDFLAGS on Verilator command line) +VM_USER_LDLIBS = \ + +# User .cpp files (from .cpp's on Verilator command line) +VM_USER_CLASSES = \ + +# User .cpp directories (from .cpp's on Verilator command line) +VM_USER_DIR = \ + + +### Default rules... +# Include list of all generated classes +include Vtb_classes.mk +# Include global rules +include $(VERILATOR_ROOT)/include/verilated.mk + +### Executable rules... (from --exe) +VPATH += $(VM_USER_DIR) + + +### Link rules... (from --exe) +Vtb: $(VK_USER_OBJS) $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a $(VM_HIER_LIBS) + $(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LIBS) $(SC_LIBS) -o $@ + + +# Verilated -*- Makefile -*- diff --git a/tetirs/obj_dir/Vtb__ALL.a b/tetirs/obj_dir/Vtb__ALL.a new file mode 100644 index 0000000..ac55f34 Binary files /dev/null and b/tetirs/obj_dir/Vtb__ALL.a differ diff --git a/tetirs/obj_dir/Vtb__ALL.cpp b/tetirs/obj_dir/Vtb__ALL.cpp new file mode 100644 index 0000000..80e4a36 --- /dev/null +++ b/tetirs/obj_dir/Vtb__ALL.cpp @@ -0,0 +1,10 @@ +// DESCRIPTION: Generated by verilator_includer via makefile +#define VL_INCLUDE_OPT include +#include "Vtb.cpp" +#include "Vtb___024root__DepSet_hfe20aad3__0.cpp" +#include "Vtb___024root__DepSet_ha183790c__0.cpp" +#include "Vtb__main.cpp" +#include "Vtb___024root__Slow.cpp" +#include "Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp" +#include "Vtb___024root__DepSet_ha183790c__0__Slow.cpp" +#include "Vtb__Syms.cpp" diff --git a/tetirs/obj_dir/Vtb__ALL.d b/tetirs/obj_dir/Vtb__ALL.d new file mode 100644 index 0000000..0611e9f --- /dev/null +++ b/tetirs/obj_dir/Vtb__ALL.d @@ -0,0 +1,12 @@ +Vtb__ALL.o: Vtb__ALL.cpp Vtb.cpp Vtb.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h Vtb__Syms.h \ + Vtb___024root.h /usr/share/verilator/include/verilated_timing.h \ + /usr/share/verilator/include/verilated.h \ + Vtb___024root__DepSet_hfe20aad3__0.cpp \ + Vtb___024root__DepSet_ha183790c__0.cpp Vtb__main.cpp \ + Vtb___024root__Slow.cpp Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp \ + Vtb___024root__DepSet_ha183790c__0__Slow.cpp Vtb__Syms.cpp diff --git a/tetirs/obj_dir/Vtb__ALL.o b/tetirs/obj_dir/Vtb__ALL.o new file mode 100644 index 0000000..3824ff3 Binary files /dev/null and b/tetirs/obj_dir/Vtb__ALL.o differ diff --git a/tetirs/obj_dir/Vtb__Syms.cpp b/tetirs/obj_dir/Vtb__Syms.cpp new file mode 100644 index 0000000..52661bb --- /dev/null +++ b/tetirs/obj_dir/Vtb__Syms.cpp @@ -0,0 +1,26 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Symbol table implementation internals + +#include "Vtb__Syms.h" +#include "Vtb.h" +#include "Vtb___024root.h" + +// FUNCTIONS +Vtb__Syms::~Vtb__Syms() +{ +} + +Vtb__Syms::Vtb__Syms(VerilatedContext* contextp, const char* namep, Vtb* modelp) + : VerilatedSyms{contextp} + // Setup internal state of the Syms class + , __Vm_modelp{modelp} + // Setup module instances + , TOP{this, namep} +{ + // Configure time unit / time precision + _vm_contextp__->timeunit(-12); + _vm_contextp__->timeprecision(-12); + // Setup each module's pointers to their submodules + // Setup each module's pointer back to symbol table (for public functions) + TOP.__Vconfigure(true); +} diff --git a/tetirs/obj_dir/Vtb__Syms.h b/tetirs/obj_dir/Vtb__Syms.h new file mode 100644 index 0000000..b74d325 --- /dev/null +++ b/tetirs/obj_dir/Vtb__Syms.h @@ -0,0 +1,37 @@ +// 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 VERILATED_VTB__SYMS_H_ +#define VERILATED_VTB__SYMS_H_ // guard + +#include "verilated.h" + +// INCLUDE MODEL CLASS + +#include "Vtb.h" + +// INCLUDE MODULE CLASSES +#include "Vtb___024root.h" + +// SYMS CLASS (contains all model state) +class Vtb__Syms final : public VerilatedSyms { + public: + // INTERNAL STATE + Vtb* const __Vm_modelp; + bool __Vm_didInit = false; + + // MODULE INSTANCE STATE + Vtb___024root TOP; + + // CONSTRUCTORS + Vtb__Syms(VerilatedContext* contextp, const char* namep, Vtb* modelp); + ~Vtb__Syms(); + + // METHODS + const char* name() { return TOP.name(); } +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + +#endif // guard diff --git a/tetirs/obj_dir/Vtb___024root.h b/tetirs/obj_dir/Vtb___024root.h new file mode 100644 index 0000000..b8a7e7f --- /dev/null +++ b/tetirs/obj_dir/Vtb___024root.h @@ -0,0 +1,52 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design internal header +// See Vtb.h for the primary calling header + +#ifndef VERILATED_VTB___024ROOT_H_ +#define VERILATED_VTB___024ROOT_H_ // guard + +#include "verilated.h" +#include "verilated_timing.h" + +class Vtb__Syms; + +class Vtb___024root final : public VerilatedModule { + public: + + // DESIGN SPECIFIC STATE + CData/*0:0*/ tb__DOT__clk; + CData/*0:0*/ tb__DOT__bitti_mi; + CData/*2:0*/ tb__DOT__parca; + CData/*4:0*/ tb__DOT__yukseklik; + CData/*4:0*/ tb__DOT__cevrim; + CData/*4:0*/ tb__DOT__uut__DOT__cevrim_r; + CData/*4:0*/ tb__DOT__uut__DOT__y_0; + CData/*4:0*/ tb__DOT__uut__DOT__y_1; + CData/*4:0*/ tb__DOT__uut__DOT__y_2; + CData/*4:0*/ __Vdly__tb__DOT__uut__DOT__y_0; + CData/*4:0*/ __Vdly__tb__DOT__uut__DOT__y_1; + CData/*4:0*/ __Vdly__tb__DOT__uut__DOT__y_2; + CData/*0:0*/ __Vtrigrprev__TOP__tb__DOT__clk; + CData/*0:0*/ __Vtrigrprev__TOP__tb__DOT__bitti_mi; + CData/*0:0*/ __VactContinue; + IData/*31:0*/ __VstlIterCount; + IData/*31:0*/ __VactIterCount; + VlDelayScheduler __VdlySched; + VlTriggerVec<1> __VstlTriggered; + VlTriggerVec<3> __VactTriggered; + VlTriggerVec<3> __VnbaTriggered; + + // INTERNAL VARIABLES + Vtb__Syms* const vlSymsp; + + // CONSTRUCTORS + Vtb___024root(Vtb__Syms* symsp, const char* v__name); + ~Vtb___024root(); + VL_UNCOPYABLE(Vtb___024root); + + // INTERNAL METHODS + void __Vconfigure(bool first); +} VL_ATTR_ALIGNED(VL_CACHE_LINE_BYTES); + + +#endif // guard diff --git a/tetirs/obj_dir/Vtb___024root__DepSet_ha183790c__0.cpp b/tetirs/obj_dir/Vtb___024root__DepSet_ha183790c__0.cpp new file mode 100644 index 0000000..511d863 --- /dev/null +++ b/tetirs/obj_dir/Vtb___024root__DepSet_ha183790c__0.cpp @@ -0,0 +1,201 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vtb.h for the primary calling header + +#include "verilated.h" + +#include "Vtb___024root.h" + +VlCoroutine Vtb___024root___eval_initial__TOP__0(Vtb___024root* vlSelf); + +void Vtb___024root___eval_initial(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_initial\n"); ); + // Body + Vtb___024root___eval_initial__TOP__0(vlSelf); + vlSelf->__Vtrigrprev__TOP__tb__DOT__clk = vlSelf->tb__DOT__clk; + vlSelf->__Vtrigrprev__TOP__tb__DOT__bitti_mi = vlSelf->tb__DOT__bitti_mi; +} + +VL_INLINE_OPT VlCoroutine Vtb___024root___eval_initial__TOP__0(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_initial__TOP__0\n"); ); + // Body + while (1U) { + co_await vlSelf->__VdlySched.delay(5U, "tb.v", + 20); + vlSelf->tb__DOT__clk = (1U & (~ (IData)(vlSelf->tb__DOT__clk))); + } + vlSelf->tb__DOT__parca = 5U; + co_await vlSelf->__VdlySched.delay(0xc8U, "tb.v", + 21); + VL_WRITEF("%2#\n%2#\n%1#\n",5,vlSelf->tb__DOT__yukseklik, + 5,(IData)(vlSelf->tb__DOT__uut__DOT__cevrim_r), + 1,vlSelf->tb__DOT__bitti_mi); + VL_FINISH_MT("tb.v", 25, ""); +} + +void Vtb___024root___eval_act(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_act\n"); ); +} + +VL_INLINE_OPT void Vtb___024root___nba_sequent__TOP__0(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___nba_sequent__TOP__0\n"); ); + // Body + vlSelf->__Vdly__tb__DOT__uut__DOT__y_2 = vlSelf->tb__DOT__uut__DOT__y_2; + vlSelf->__Vdly__tb__DOT__uut__DOT__y_1 = vlSelf->tb__DOT__uut__DOT__y_1; + vlSelf->__Vdly__tb__DOT__uut__DOT__y_0 = vlSelf->tb__DOT__uut__DOT__y_0; + if ((0x10U != (IData)(vlSelf->tb__DOT__uut__DOT__cevrim_r))) { + vlSelf->__Vdly__tb__DOT__uut__DOT__y_2 = (0x1fU + & ((IData)(vlSelf->tb__DOT__uut__DOT__y_2) + + + (1U + & ((IData)(vlSelf->tb__DOT__parca) + >> 2U)))); + vlSelf->__Vdly__tb__DOT__uut__DOT__y_1 = (0x1fU + & ((IData)(vlSelf->tb__DOT__uut__DOT__y_1) + + + (1U + & ((IData)(vlSelf->tb__DOT__parca) + >> 1U)))); + vlSelf->__Vdly__tb__DOT__uut__DOT__y_0 = (0x1fU + & ((IData)(vlSelf->tb__DOT__uut__DOT__y_0) + + + (1U + & (IData)(vlSelf->tb__DOT__parca)))); + } + if ((0x10U != (IData)(vlSelf->tb__DOT__cevrim))) { + vlSelf->tb__DOT__uut__DOT__cevrim_r = (0x1fU + & ((IData)(1U) + + (IData)(vlSelf->tb__DOT__uut__DOT__cevrim_r))); + } + vlSelf->tb__DOT__cevrim = vlSelf->tb__DOT__uut__DOT__cevrim_r; + vlSelf->tb__DOT__bitti_mi = (0x10U == (IData)(vlSelf->tb__DOT__uut__DOT__cevrim_r)); +} + +VL_INLINE_OPT void Vtb___024root___nba_sequent__TOP__1(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___nba_sequent__TOP__1\n"); ); + // Body + if (((IData)(vlSelf->tb__DOT__uut__DOT__y_0) > (IData)(vlSelf->tb__DOT__uut__DOT__y_1))) { + vlSelf->tb__DOT__yukseklik = (((IData)(vlSelf->tb__DOT__uut__DOT__y_0) + > (IData)(vlSelf->tb__DOT__uut__DOT__y_2)) + ? (IData)(vlSelf->tb__DOT__uut__DOT__y_0) + : (IData)(vlSelf->tb__DOT__uut__DOT__y_2)); + } else if (((IData)(vlSelf->tb__DOT__uut__DOT__y_0) + > (IData)(vlSelf->tb__DOT__uut__DOT__y_1))) { + vlSelf->tb__DOT__yukseklik = (((IData)(vlSelf->tb__DOT__uut__DOT__y_1) + > (IData)(vlSelf->tb__DOT__uut__DOT__y_2)) + ? (IData)(vlSelf->tb__DOT__uut__DOT__y_1) + : (IData)(vlSelf->tb__DOT__uut__DOT__y_2)); + } +} + +VL_INLINE_OPT void Vtb___024root___nba_sequent__TOP__2(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___nba_sequent__TOP__2\n"); ); + // Body + vlSelf->tb__DOT__uut__DOT__y_0 = vlSelf->__Vdly__tb__DOT__uut__DOT__y_0; + vlSelf->tb__DOT__uut__DOT__y_1 = vlSelf->__Vdly__tb__DOT__uut__DOT__y_1; + vlSelf->tb__DOT__uut__DOT__y_2 = vlSelf->__Vdly__tb__DOT__uut__DOT__y_2; +} + +void Vtb___024root___eval_nba(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_nba\n"); ); + // Body + if (vlSelf->__VnbaTriggered.at(0U)) { + Vtb___024root___nba_sequent__TOP__0(vlSelf); + } + if (vlSelf->__VnbaTriggered.at(1U)) { + Vtb___024root___nba_sequent__TOP__1(vlSelf); + } + if (vlSelf->__VnbaTriggered.at(0U)) { + Vtb___024root___nba_sequent__TOP__2(vlSelf); + } +} + +void Vtb___024root___eval_triggers__act(Vtb___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__act(Vtb___024root* vlSelf); +#endif // VL_DEBUG +void Vtb___024root___timing_resume(Vtb___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__nba(Vtb___024root* vlSelf); +#endif // VL_DEBUG + +void Vtb___024root___eval(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval\n"); ); + // Init + VlTriggerVec<3> __VpreTriggered; + IData/*31:0*/ __VnbaIterCount; + CData/*0:0*/ __VnbaContinue; + // Body + __VnbaIterCount = 0U; + __VnbaContinue = 1U; + while (__VnbaContinue) { + __VnbaContinue = 0U; + vlSelf->__VnbaTriggered.clear(); + vlSelf->__VactIterCount = 0U; + vlSelf->__VactContinue = 1U; + while (vlSelf->__VactContinue) { + vlSelf->__VactContinue = 0U; + Vtb___024root___eval_triggers__act(vlSelf); + if (vlSelf->__VactTriggered.any()) { + vlSelf->__VactContinue = 1U; + if (VL_UNLIKELY((0x64U < vlSelf->__VactIterCount))) { +#ifdef VL_DEBUG + Vtb___024root___dump_triggers__act(vlSelf); +#endif + VL_FATAL_MT("tb.v", 1, "", "Active region did not converge."); + } + vlSelf->__VactIterCount = ((IData)(1U) + + vlSelf->__VactIterCount); + __VpreTriggered.andNot(vlSelf->__VactTriggered, vlSelf->__VnbaTriggered); + vlSelf->__VnbaTriggered.set(vlSelf->__VactTriggered); + Vtb___024root___timing_resume(vlSelf); + Vtb___024root___eval_act(vlSelf); + } + } + if (vlSelf->__VnbaTriggered.any()) { + __VnbaContinue = 1U; + if (VL_UNLIKELY((0x64U < __VnbaIterCount))) { +#ifdef VL_DEBUG + Vtb___024root___dump_triggers__nba(vlSelf); +#endif + VL_FATAL_MT("tb.v", 1, "", "NBA region did not converge."); + } + __VnbaIterCount = ((IData)(1U) + __VnbaIterCount); + Vtb___024root___eval_nba(vlSelf); + } + } +} + +void Vtb___024root___timing_resume(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___timing_resume\n"); ); + // Body + if (vlSelf->__VactTriggered.at(2U)) { + vlSelf->__VdlySched.resume(); + } +} + +#ifdef VL_DEBUG +void Vtb___024root___eval_debug_assertions(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_debug_assertions\n"); ); +} +#endif // VL_DEBUG diff --git a/tetirs/obj_dir/Vtb___024root__DepSet_ha183790c__0__Slow.cpp b/tetirs/obj_dir/Vtb___024root__DepSet_ha183790c__0__Slow.cpp new file mode 100644 index 0000000..383ba83 --- /dev/null +++ b/tetirs/obj_dir/Vtb___024root__DepSet_ha183790c__0__Slow.cpp @@ -0,0 +1,165 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vtb.h for the primary calling header + +#include "verilated.h" + +#include "Vtb___024root.h" + +VL_ATTR_COLD void Vtb___024root___eval_static__TOP(Vtb___024root* vlSelf); + +VL_ATTR_COLD void Vtb___024root___eval_static(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_static\n"); ); + // Body + Vtb___024root___eval_static__TOP(vlSelf); +} + +VL_ATTR_COLD void Vtb___024root___eval_static__TOP(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_static__TOP\n"); ); + // Body + vlSelf->tb__DOT__clk = 0U; + vlSelf->tb__DOT__uut__DOT__cevrim_r = 0U; + vlSelf->tb__DOT__uut__DOT__y_0 = 0U; + vlSelf->tb__DOT__uut__DOT__y_1 = 0U; + vlSelf->tb__DOT__uut__DOT__y_2 = 0U; +} + +VL_ATTR_COLD void Vtb___024root___eval_final(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_final\n"); ); +} + +VL_ATTR_COLD void Vtb___024root___eval_triggers__stl(Vtb___024root* vlSelf); +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__stl(Vtb___024root* vlSelf); +#endif // VL_DEBUG +VL_ATTR_COLD void Vtb___024root___eval_stl(Vtb___024root* vlSelf); + +VL_ATTR_COLD void Vtb___024root___eval_settle(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_settle\n"); ); + // Init + CData/*0:0*/ __VstlContinue; + // Body + vlSelf->__VstlIterCount = 0U; + __VstlContinue = 1U; + while (__VstlContinue) { + __VstlContinue = 0U; + Vtb___024root___eval_triggers__stl(vlSelf); + if (vlSelf->__VstlTriggered.any()) { + __VstlContinue = 1U; + if (VL_UNLIKELY((0x64U < vlSelf->__VstlIterCount))) { +#ifdef VL_DEBUG + Vtb___024root___dump_triggers__stl(vlSelf); +#endif + VL_FATAL_MT("tb.v", 1, "", "Settle region did not converge."); + } + vlSelf->__VstlIterCount = ((IData)(1U) + + vlSelf->__VstlIterCount); + Vtb___024root___eval_stl(vlSelf); + } + } +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__stl(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___dump_triggers__stl\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VstlTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VstlTriggered.at(0U)) { + VL_DBG_MSGF(" 'stl' region trigger index 0 is active: Internal 'stl' trigger - first iteration\n"); + } +} +#endif // VL_DEBUG + +VL_ATTR_COLD void Vtb___024root___stl_sequent__TOP__0(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___stl_sequent__TOP__0\n"); ); + // Body + vlSelf->tb__DOT__cevrim = vlSelf->tb__DOT__uut__DOT__cevrim_r; + vlSelf->tb__DOT__bitti_mi = (0x10U == (IData)(vlSelf->tb__DOT__uut__DOT__cevrim_r)); +} + +VL_ATTR_COLD void Vtb___024root___eval_stl(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_stl\n"); ); + // Body + if (vlSelf->__VstlTriggered.at(0U)) { + Vtb___024root___stl_sequent__TOP__0(vlSelf); + } +} + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__act(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___dump_triggers__act\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VactTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VactTriggered.at(0U)) { + VL_DBG_MSGF(" 'act' region trigger index 0 is active: @(posedge tb.clk)\n"); + } + if (vlSelf->__VactTriggered.at(1U)) { + VL_DBG_MSGF(" 'act' region trigger index 1 is active: @(posedge tb.bitti_mi)\n"); + } + if (vlSelf->__VactTriggered.at(2U)) { + VL_DBG_MSGF(" 'act' region trigger index 2 is active: @([true] __VdlySched.awaitingCurrentTime())\n"); + } +} +#endif // VL_DEBUG + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__nba(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___dump_triggers__nba\n"); ); + // Body + if ((1U & (~ (IData)(vlSelf->__VnbaTriggered.any())))) { + VL_DBG_MSGF(" No triggers active\n"); + } + if (vlSelf->__VnbaTriggered.at(0U)) { + VL_DBG_MSGF(" 'nba' region trigger index 0 is active: @(posedge tb.clk)\n"); + } + if (vlSelf->__VnbaTriggered.at(1U)) { + VL_DBG_MSGF(" 'nba' region trigger index 1 is active: @(posedge tb.bitti_mi)\n"); + } + if (vlSelf->__VnbaTriggered.at(2U)) { + VL_DBG_MSGF(" 'nba' region trigger index 2 is active: @([true] __VdlySched.awaitingCurrentTime())\n"); + } +} +#endif // VL_DEBUG + +VL_ATTR_COLD void Vtb___024root___ctor_var_reset(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___ctor_var_reset\n"); ); + // Body + vlSelf->tb__DOT__parca = VL_RAND_RESET_I(3); + vlSelf->tb__DOT__clk = VL_RAND_RESET_I(1); + vlSelf->tb__DOT__yukseklik = VL_RAND_RESET_I(5); + vlSelf->tb__DOT__cevrim = VL_RAND_RESET_I(5); + vlSelf->tb__DOT__bitti_mi = VL_RAND_RESET_I(1); + vlSelf->tb__DOT__uut__DOT__cevrim_r = VL_RAND_RESET_I(5); + vlSelf->tb__DOT__uut__DOT__y_0 = VL_RAND_RESET_I(5); + vlSelf->tb__DOT__uut__DOT__y_1 = VL_RAND_RESET_I(5); + vlSelf->tb__DOT__uut__DOT__y_2 = VL_RAND_RESET_I(5); + vlSelf->__Vdly__tb__DOT__uut__DOT__y_0 = VL_RAND_RESET_I(5); + vlSelf->__Vdly__tb__DOT__uut__DOT__y_1 = VL_RAND_RESET_I(5); + vlSelf->__Vdly__tb__DOT__uut__DOT__y_2 = VL_RAND_RESET_I(5); + vlSelf->__Vtrigrprev__TOP__tb__DOT__clk = VL_RAND_RESET_I(1); + vlSelf->__Vtrigrprev__TOP__tb__DOT__bitti_mi = VL_RAND_RESET_I(1); +} diff --git a/tetirs/obj_dir/Vtb___024root__DepSet_hfe20aad3__0.cpp b/tetirs/obj_dir/Vtb___024root__DepSet_hfe20aad3__0.cpp new file mode 100644 index 0000000..66b09af --- /dev/null +++ b/tetirs/obj_dir/Vtb___024root__DepSet_hfe20aad3__0.cpp @@ -0,0 +1,31 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vtb.h for the primary calling header + +#include "verilated.h" + +#include "Vtb__Syms.h" +#include "Vtb___024root.h" + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__act(Vtb___024root* vlSelf); +#endif // VL_DEBUG + +void Vtb___024root___eval_triggers__act(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_triggers__act\n"); ); + // Body + vlSelf->__VactTriggered.at(0U) = ((IData)(vlSelf->tb__DOT__clk) + & (~ (IData)(vlSelf->__Vtrigrprev__TOP__tb__DOT__clk))); + vlSelf->__VactTriggered.at(1U) = ((IData)(vlSelf->tb__DOT__bitti_mi) + & (~ (IData)(vlSelf->__Vtrigrprev__TOP__tb__DOT__bitti_mi))); + vlSelf->__VactTriggered.at(2U) = vlSelf->__VdlySched.awaitingCurrentTime(); + vlSelf->__Vtrigrprev__TOP__tb__DOT__clk = vlSelf->tb__DOT__clk; + vlSelf->__Vtrigrprev__TOP__tb__DOT__bitti_mi = vlSelf->tb__DOT__bitti_mi; +#ifdef VL_DEBUG + if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) { + Vtb___024root___dump_triggers__act(vlSelf); + } +#endif +} diff --git a/tetirs/obj_dir/Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp b/tetirs/obj_dir/Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp new file mode 100644 index 0000000..4f0f3bd --- /dev/null +++ b/tetirs/obj_dir/Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp @@ -0,0 +1,25 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vtb.h for the primary calling header + +#include "verilated.h" + +#include "Vtb__Syms.h" +#include "Vtb___024root.h" + +#ifdef VL_DEBUG +VL_ATTR_COLD void Vtb___024root___dump_triggers__stl(Vtb___024root* vlSelf); +#endif // VL_DEBUG + +VL_ATTR_COLD void Vtb___024root___eval_triggers__stl(Vtb___024root* vlSelf) { + if (false && vlSelf) {} // Prevent unused + Vtb__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp; + VL_DEBUG_IF(VL_DBG_MSGF("+ Vtb___024root___eval_triggers__stl\n"); ); + // Body + vlSelf->__VstlTriggered.at(0U) = (0U == vlSelf->__VstlIterCount); +#ifdef VL_DEBUG + if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) { + Vtb___024root___dump_triggers__stl(vlSelf); + } +#endif +} diff --git a/tetirs/obj_dir/Vtb___024root__Slow.cpp b/tetirs/obj_dir/Vtb___024root__Slow.cpp new file mode 100644 index 0000000..cd769c2 --- /dev/null +++ b/tetirs/obj_dir/Vtb___024root__Slow.cpp @@ -0,0 +1,26 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: Verilator output: Design implementation internals +// See Vtb.h for the primary calling header + +#include "verilated.h" + +#include "Vtb__Syms.h" +#include "Vtb___024root.h" + +void Vtb___024root___ctor_var_reset(Vtb___024root* vlSelf); + +Vtb___024root::Vtb___024root(Vtb__Syms* symsp, const char* v__name) + : VerilatedModule{v__name} + , __VdlySched{*symsp->_vm_contextp__} + , vlSymsp{symsp} + { + // Reset structure values + Vtb___024root___ctor_var_reset(this); +} + +void Vtb___024root::__Vconfigure(bool first) { + if (false && first) {} // Prevent unused +} + +Vtb___024root::~Vtb___024root() { +} diff --git a/tetirs/obj_dir/Vtb__main.cpp b/tetirs/obj_dir/Vtb__main.cpp new file mode 100644 index 0000000..363d543 --- /dev/null +++ b/tetirs/obj_dir/Vtb__main.cpp @@ -0,0 +1,34 @@ +// Verilated -*- C++ -*- +// DESCRIPTION: main() calling loop, created with Verilator --main + +#include "verilated.h" +#include "Vtb.h" + +//====================== + +int main(int argc, char** argv, char**) { + // Setup context, defaults, and parse command line + Verilated::debug(0); + const std::unique_ptr contextp{new VerilatedContext}; + contextp->commandArgs(argc, argv); + + // Construct the Verilated model, from Vtop.h generated from Verilating + const std::unique_ptr topp{new Vtb{contextp.get()}}; + + // Simulate until $finish + while (!contextp->gotFinish()) { + // Evaluate model + topp->eval(); + // Advance time + if (!topp->eventsPending()) break; + contextp->time(topp->nextTimeSlot()); + } + + if (!contextp->gotFinish()) { + VL_DEBUG_IF(VL_PRINTF("+ Exiting without $finish; no events left\n");); + } + + // Final model cleanup + topp->final(); + return 0; +} diff --git a/tetirs/obj_dir/Vtb__ver.d b/tetirs/obj_dir/Vtb__ver.d new file mode 100644 index 0000000..59ce868 --- /dev/null +++ b/tetirs/obj_dir/Vtb__ver.d @@ -0,0 +1 @@ +obj_dir/Vtb.cpp obj_dir/Vtb.h obj_dir/Vtb.mk obj_dir/Vtb__Syms.cpp obj_dir/Vtb__Syms.h obj_dir/Vtb___024root.h obj_dir/Vtb___024root__DepSet_ha183790c__0.cpp obj_dir/Vtb___024root__DepSet_ha183790c__0__Slow.cpp obj_dir/Vtb___024root__DepSet_hfe20aad3__0.cpp obj_dir/Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp obj_dir/Vtb___024root__Slow.cpp obj_dir/Vtb__main.cpp obj_dir/Vtb__ver.d obj_dir/Vtb_classes.mk : /usr/bin/verilator_bin /usr/bin/verilator_bin tb.v tetris.v diff --git a/tetirs/obj_dir/Vtb__verFiles.dat b/tetirs/obj_dir/Vtb__verFiles.dat new file mode 100644 index 0000000..d627a65 --- /dev/null +++ b/tetirs/obj_dir/Vtb__verFiles.dat @@ -0,0 +1,20 @@ +# DESCRIPTION: Verilator output: Timestamp data for --skip-identical. Delete at will. +C "--binary tb.v tetris.v --timing" +S 12244816 28045 1719496600 881980186 1680199511 0 "/usr/bin/verilator_bin" +T 2837 6675 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb.cpp" +T 2631 6439 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb.h" +T 1722 7381 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb.mk" +T 730 216 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb__Syms.cpp" +T 884 225 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb__Syms.h" +T 1524 6695 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb___024root.h" +T 9237 7333 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb___024root__DepSet_ha183790c__0.cpp" +T 6922 7184 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb___024root__DepSet_ha183790c__0__Slow.cpp" +T 1304 7283 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb___024root__DepSet_hfe20aad3__0.cpp" +T 823 7044 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb___024root__DepSet_hfe20aad3__0__Slow.cpp" +T 644 6712 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb___024root__Slow.cpp" +T 955 7337 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb__main.cpp" +T 471 7389 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb__ver.d" +T 0 0 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb__verFiles.dat" +T 1646 7340 1720894776 185681955 1720894776 185681955 "obj_dir/Vtb_classes.mk" +S 376 233 1720894754 765684145 1720894754 765684145 "tb.v" +S 820 230 1720894095 565675203 1720894095 565675203 "tetris.v" diff --git a/tetirs/obj_dir/Vtb_classes.mk b/tetirs/obj_dir/Vtb_classes.mk new file mode 100644 index 0000000..2f65e84 --- /dev/null +++ b/tetirs/obj_dir/Vtb_classes.mk @@ -0,0 +1,54 @@ +# Verilated -*- Makefile -*- +# DESCRIPTION: Verilator output: Make include file with class lists +# +# This file lists generated Verilated files, for including in higher level makefiles. +# See Vtb.mk for the caller. + +### Switches... +# C11 constructs required? 0/1 (always on now) +VM_C11 = 1 +# Timing enabled? 0/1 +VM_TIMING = 1 +# Coverage output mode? 0/1 (from --coverage) +VM_COVERAGE = 0 +# Parallel builds? 0/1 (from --output-split) +VM_PARALLEL_BUILDS = 0 +# Tracing output mode? 0/1 (from --trace/--trace-fst) +VM_TRACE = 0 +# Tracing output mode in VCD format? 0/1 (from --trace) +VM_TRACE_VCD = 0 +# Tracing output mode in FST format? 0/1 (from --trace-fst) +VM_TRACE_FST = 0 + +### Object file lists... +# Generated module classes, fast-path, compile with highest optimization +VM_CLASSES_FAST += \ + Vtb \ + Vtb___024root__DepSet_hfe20aad3__0 \ + Vtb___024root__DepSet_ha183790c__0 \ + Vtb__main \ + +# Generated module classes, non-fast-path, compile with low/medium optimization +VM_CLASSES_SLOW += \ + Vtb___024root__Slow \ + Vtb___024root__DepSet_hfe20aad3__0__Slow \ + Vtb___024root__DepSet_ha183790c__0__Slow \ + +# Generated support classes, fast-path, compile with highest optimization +VM_SUPPORT_FAST += \ + +# Generated support classes, non-fast-path, compile with low/medium optimization +VM_SUPPORT_SLOW += \ + Vtb__Syms \ + +# Global classes, need linked once per executable, fast-path, compile with highest optimization +VM_GLOBAL_FAST += \ + verilated \ + verilated_timing \ + verilated_threads \ + +# Global classes, need linked once per executable, non-fast-path, compile with low/medium optimization +VM_GLOBAL_SLOW += \ + + +# Verilated -*- Makefile -*- diff --git a/tetirs/obj_dir/verilated.d b/tetirs/obj_dir/verilated.d new file mode 100644 index 0000000..6ed3629 --- /dev/null +++ b/tetirs/obj_dir/verilated.d @@ -0,0 +1,12 @@ +verilated.o: /usr/share/verilator/include/verilated.cpp \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_imp.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h \ + /usr/share/verilator/include/verilated_syms.h \ + /usr/share/verilator/include/verilated_sym_props.h \ + /usr/share/verilator/include/verilated_threads.h \ + /usr/share/verilator/include/verilated_trace.h \ + /usr/share/verilator/include/verilated_trace_defs.h diff --git a/tetirs/obj_dir/verilated.o b/tetirs/obj_dir/verilated.o new file mode 100644 index 0000000..d7daedd Binary files /dev/null and b/tetirs/obj_dir/verilated.o differ diff --git a/tetirs/obj_dir/verilated_threads.d b/tetirs/obj_dir/verilated_threads.d new file mode 100644 index 0000000..a1b1a49 --- /dev/null +++ b/tetirs/obj_dir/verilated_threads.d @@ -0,0 +1,7 @@ +verilated_threads.o: /usr/share/verilator/include/verilated_threads.cpp \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_threads.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h diff --git a/tetirs/obj_dir/verilated_threads.o b/tetirs/obj_dir/verilated_threads.o new file mode 100644 index 0000000..bce79c7 Binary files /dev/null and b/tetirs/obj_dir/verilated_threads.o differ diff --git a/tetirs/obj_dir/verilated_timing.d b/tetirs/obj_dir/verilated_timing.d new file mode 100644 index 0000000..91d0e85 --- /dev/null +++ b/tetirs/obj_dir/verilated_timing.d @@ -0,0 +1,7 @@ +verilated_timing.o: /usr/share/verilator/include/verilated_timing.cpp \ + /usr/share/verilator/include/verilated_timing.h \ + /usr/share/verilator/include/verilated.h \ + /usr/share/verilator/include/verilatedos.h \ + /usr/share/verilator/include/verilated_config.h \ + /usr/share/verilator/include/verilated_types.h \ + /usr/share/verilator/include/verilated_funcs.h diff --git a/tetirs/obj_dir/verilated_timing.o b/tetirs/obj_dir/verilated_timing.o new file mode 100644 index 0000000..61f79d6 Binary files /dev/null and b/tetirs/obj_dir/verilated_timing.o differ diff --git a/tetirs/run.sh b/tetirs/run.sh new file mode 100644 index 0000000..213704a --- /dev/null +++ b/tetirs/run.sh @@ -0,0 +1,5 @@ +iverilog *.v && vvp a.out +if [ -f "dump.vcd" ]; then + gtkwave dump.vcd + rm dump.vcd +fi diff --git a/tetirs/tb.v b/tetirs/tb.v new file mode 100644 index 0000000..47c8505 --- /dev/null +++ b/tetirs/tb.v @@ -0,0 +1,45 @@ +module tb(); + +reg [2:0] parca; +reg clk = 0; + +wire [4:0] yukseklik; +wire [4:0] cevrim; +wire bitti_mi; + +tetris uut( + .parca(parca), + .clk(clk), + .yukseklik(yukseklik), + .cevrim(cevrim), + .bitti_mi(bitti_mi) +); + +always begin + clk = ~clk; #5; +end + +initial begin + $dumpvars; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + parca = 3'b101; #10; + parca = 3'b000; #10; + $finish; +end + +endmodule diff --git a/tetirs/tetris.v b/tetirs/tetris.v new file mode 100644 index 0000000..78c3ffc --- /dev/null +++ b/tetirs/tetris.v @@ -0,0 +1,41 @@ +module tetris( + input clk, + input [2:0] parca, + output reg [4:0] yukseklik, + output [4:0] cevrim, + output bitti_mi +); + +reg [4:0] cevrim_r = 0; +reg [4:0] y_0 = 0; +reg [4:0] y_1 = 0; +reg [4:0] y_2 = 0; +assign cevrim = cevrim_r; +assign bitti_mi = cevrim_r == 5'b10000; + +always @(posedge clk) begin + if (cevrim != 5'b10000) begin + cevrim_r <= cevrim_r + 5'd1; + y_0 <= y_0 + {4'b0000, parca[0]}; + y_1 <= y_1 + {4'b0000, parca[1]}; + y_2 <= y_2 + {4'b0000, parca[2]}; + end +end + +/* always @(posedge bitti_mi) + yukseklik <= y_0 > y_1 + ? y_0 > y_2 ? y_0 : y_2 + : y_1 > y_2 ? y_1 : y_2; + */ + +always @(posedge bitti_mi) begin + if (y_0 > y_1) begin + if (y_0 > y_2) yukseklik <= y_0; + else yukseklik <= y_2; + end else if (y_0 > y_1) begin + if (y_1 > y_2) yukseklik <= y_1; + else yukseklik <= y_2; + end +end + +endmodule