text
stringlengths
41
20k
/* * Copyright (C) 2020 GreenWaves Technologies, SAS, ETH Zurich and * University of Bologna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
#ifndef SOBEL_EDGE_DETECTOR_TLM_HPP #define SOBEL_EDGE_DETECTOR_TLM_HPP #include <systemc.h> using namespace sc_core; using namespace sc_dt; using namespace std; #include <tlm.h> #include <tlm_utils/simple_initiator_socket.h> #include <tlm_utils/simple_target_socket.h> #include <tlm_utils/peq_with_cb_and_phase.h> #i...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #ifndef _Detecteur2_ #define _Detecteur2_ #include "systemc.h" #include <cstdint> #include "Doubleur_uint.hpp" #include "trames_separ2.hpp" #include "Seuil_calc2.hpp" // #defi...
/******************************************************************************* * clkpacer.cpp -- Copyright 2019 Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * Implements functions to step time. No clock was implemented to avoid the ...
/******************************************************************************** * University of L'Aquila - HEPSYCODE Source Code License * * * * ...
#ifndef IPS_MEMORY_HPP #define IPS_MEMORY_HPP #include <systemc.h> template <unsigned int SIZE> SC_MODULE(memory) { protected: int *mem; public: sc_core::sc_in<bool> clk; sc_core::sc_in<bool> we; sc_core::sc_in<unsigned long long int> address; sc_core::sc_in<sc_uint<24>> wdata; sc_core::sc_out<sc_uint<24>...
#include <systemc.h> /** * @brief jpg_output module. Federico Cruz * It takes the image and compresses it into jpeg format * It is done in 4 parts: * 1. Divides the image in 8x8 pixel blocks; for 8-bit grayscale images the a level shift is done by substracting 128 from each pixel. * 2. Discrete Cosine Transform (...
#ifndef IPS_FILTER_TLM_HPP #define IPS_FILTER_TLM_HPP #include <systemc.h> using namespace sc_core; using namespace sc_dt; using namespace std; #include "ips_filter_lt_model.hpp" #include "../src/img_target.cpp" #include "important_defines.hpp" //Extended Unification TLM struct ips_filter_tlm : public Filter<IPS_IN...
#include<systemc.h> #include<vector> #include "interfaces.hpp" #include<nana/gui/widgets/listbox.hpp> using std::vector; class instruction_queue_rob: public sc_module { public: sc_port<read_if> in; sc_port<write_if_f> out; sc_port<read_if> in_rob; SC_HAS_PROCESS(instruction_queue_rob); instructio...
#include <systemc.h> #include <systemc-ams.h> #include <config.hpp> SCA_TDF_MODULE(Power_bus){ //Rate 1ms //Input Port sca_tdf::sca_in <double> core_current; sca_tdf::sca_in <double> core_voltage; sca_tdf::sca_in <double> voltage_sensors[NUM_SENSORS]; sca_tdf::sca_in <double> current_sensor...
/* * Copyright (C) 2020 GreenWaves Technologies, SAS, ETH Zurich and * University of Bologna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
/* * Copyright (C) 2020 GreenWaves Technologies, SAS, ETH Zurich and * University of Bologna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
/* Copyright 2017 Columbia University, SLD Group */ // // hl5.h - Robert Margelli // Header file of the hl5 CPU container. // This module instantiates the stages and interconnects them. // #ifndef __HL5__H #define __HL5__H #include <systemc.h> #include "cynw_flex_channels.h" #include "hl5_datatypes.hpp" #include "d...
#pragma once #include "systemc.hpp" #include "common.hpp" struct Stimulus_module : sc_core::sc_module { sc_core::sc_export<sc_core::sc_fifo_in_if<Data_t>> stim_export { "stim_export" }; sc_core::sc_export<sc_core::sc_signal_in_if<bool>> running_export { "running_export" }; Stimulus_module( sc_core::sc_module...
#include <systemc.h> #include <systemc-ams.h> #include <config.hpp> #include <core.hpp> #define V_CORE ${vref} SCA_TDF_MODULE(Core_power) { Core* core; //Data from Functional Instance sca_tdf::sc_in <double> func_signal; //Data to Power Bus sca_tdf::sca_out <double> voltage_state; sca_tdf::sc...
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2017 Cadence Design Systems, Inc. All rights reserved worldwide. // // The code contained herein is the proprietary and confidential information // of Cadence or its licensors, and is supplied subject to a previously // ...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #include "systemc.h" #include "constantes.hpp" #include "../../Tools/BMP.hpp" #include <string> SC_MODULE(BMPWriter) { public: sc_fifo_in< sc_uint<32> > addr; sc_fifo_in< ...
#ifndef __MESSY_CORE_H__ #define __MESSY_CORE_H__ #include <config.hpp> #include <systemc.h> #include <cstring> #include <string.h> #include <adapters/${adapter_filenames}.hpp> #include <messy_request.hpp> class Core : public sc_module { public: void run(); void close(); void run_next_sc(); void co...
#include <map> #include <sstream> #include "systemc.h" #ifndef SC_TRACE_HPP #define SC_TRACE_HPP /** SystemC signal and variable tracer wrapper. */ class sc_tracer; // forward declaration for global singleton class sc_tracer { public: /** Global singleton instance */ static sc_tracer tracer; ...
#ifndef SOBEL_EDGE_DETECTOR_TLM_HPP #define SOBEL_EDGE_DETECTOR_TLM_HPP #include <systemc.h> using namespace sc_core; using namespace sc_dt; using namespace std; #include <tlm.h> #include <tlm_utils/simple_initiator_socket.h> #include <tlm_utils/simple_target_socket.h> #include <tlm_utils/peq_with_cb_and_phase.h> #in...
/***************************************************************************\ * * * ___ ___ ___ ___ * / /\ / /\ / /\ / /\ * / /:/ / /::\ / /::\ / /::\ * / /:/ / /:/\:\ / /:/\:\ / /:/\:\ *...
/***************************************************************************\ * * * ___ ___ ___ ___ * / /\ / /\ / /\ / /\ * / /:/ / /::\ / /::\ / /::\ * / /:/ / /:/\:\ / /:/\:\ / /:/\:\ *...
timesRetLoc += 4; this->processorInstance.writeMem(timesRetLoc, buf.tms_cstime); } this->processorInstance.setRetVal(curSimTime); this->processorInstance.returnFromCall(); this->processorInstance.postCall(); if(this->latency.to_double() > 0) wait(...
NEWLIB_SC_SIGQUEUE_MAX 18 #define NEWLIB_SC_TIMER_MAX 19 #define NEWLIB_SC_TZNAME_MAX 20 #define NEWLIB_SC_ASYNCHRONOUS_IO 21 #define NEWLIB_SC_FSYNC 22 #define NEWLIB_SC_MAPPED_FILES 23 #define NEWLIB_SC_MEMLOCK ...
#ifndef IPS_FILTER_PV_MODEL_HPP #define IPS_FILTER_PV_MODEL_HPP #ifdef IPS_DEBUG_EN #include <iostream> #endif // IPS_DEBUG_ENi #ifdef IPS_DUMP_EN #include <sstream> #endif // IPS_DUMP_EN #include <systemc.h> /** * @brief Filter module. * It takes care of filtering a image/kernel using a median filter or an * equi...
#ifndef IMG_RECEIVER_HPP #define IMG_RECEIVER_HPP #include <systemc.h> #include "address_map.hpp" SC_MODULE(img_receiver) { //Array for input image unsigned char* input_image; sc_dt::uint64 address_offset; SC_CTOR(img_receiver) { input_image = new unsigned char[IMG_INPUT_SIZE]; ad...
#ifndef IMG_GENERIC_EXTENSION_HPP #define IMG_GENERIC_EXTENSION_HPP #include <systemc.h> using namespace sc_core; using namespace sc_dt; using namespace std; #include <tlm.h> #include <tlm_utils/simple_initiator_socket.h> #include <tlm_utils/simple_target_socket.h> #include <tlm_utils/peq_with_cb_and_phase.h> struct ...
#pragma once /** @class Objection @brief UVM-like mechanism to stop simulation when the last objection is removed. Usage ----- ### Step 1 Instantiate `Objector_module` somewhere (e.g. under the top-most module) ### Step 2 Establish a drain-time using `Objection::set_drain_time(sc_time)`. The drain-time is how l...
#include <crave/SystemC.hpp> #include <crave/ConstrainedRandom.hpp> #include <systemc.h> #include <boost/timer.hpp> using crave::rand_obj; using crave::randv; using sc_dt::sc_bv; using sc_dt::sc_uint; struct ALU12 : public rand_obj { randv< sc_bv<2> > op ; randv< sc_uint<12> > a, b ; ALU12() : op(this), a(t...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #ifndef _trames_separ_ #define _trames_separ_ #include "systemc.h" #include <cstdint> #include "constantes.hpp" using namespace std; // #define _DEBUG_SYNCHRO_ SC_MODULE(tram...
/* * Created on: 21. jun. 2019 * Author: Jonathan Horsted Schougaard */ #pragma once #define SC_INCLUDE_FX #include <systemc.h> #include "hwcore/cnn/cnn.h" #include "hwcore/pipes/pipes.h" #include "hwcore/hf/helperlib.h" using namespace hwcore; SC_MODULE(cpu_sim) { sc_fifo_out<pipes::sc_data_stream_t<16*...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #include "systemc.h" SC_MODULE(RAWReader) { public: sc_fifo_out< sc_int<8> > s; SC_CTOR(RAWReader) { SC_THREAD(do_gen); } private: void do_gen( ) { cout << "(II) ...
/* Copyright 2017 Columbia University, SLD Group */ // // fedec.h - Robert Margelli // fetch + decoding logic header file. // #ifndef __FEDEC__H #define __FEDEC__H #include <systemc.h> #include "cynw_flex_channels.h" #include "defines.hpp" #include "globals.hpp" #include "syn_directives.hpp" #include "hl5_datatype...
#include <systemc.h> #include <systemc-ams.h> #include <config.hpp> #include <core.hpp> #define V_CORE ${vref} SCA_TDF_MODULE(Core_power) { Core* core; //Data from Functional Instance sca_tdf::sc_in <double> func_signal; //Data to Power Bus sca_tdf::sca_out <double> voltage_state; sca_tdf::sc...
#include <map> #include <sstream> #include "systemc.h" #ifndef SC_TRACE_HPP #define SC_TRACE_HPP /** SystemC signal and variable tracer wrapper. */ class sc_tracer; // forward declaration for global singleton class sc_tracer { public: /** Global singleton instance */ static sc_tracer tracer; ...
#ifndef IMG_RECEIVER_HPP #define IMG_RECEIVER_HPP #include <systemc.h> #include "address_map.hpp" SC_MODULE(img_receiver) { //Array for input image unsigned char* input_image; sc_dt::uint64 address_offset; SC_CTOR(img_receiver) { input_image = new unsigned char[IMG_INPUT_SIZE]; ad...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #ifndef _Detecteur1_ #define _Detecteur1_ #include "systemc.h" #include <cstdint> #include "Doubleur_uint.hpp" #include "trames_separ1.hpp" #include "Seuil_calc1.hpp" // #defi...
/* Copyright 2017 Columbia University, SLD Group */ // // globals.h - Robert Margelli // This file several defines and constants: number of registers, data width, opcodes etc. // #ifndef GLOBALS_H #define GLOBALS_H #include "systemc.h" // Miscellanous sizes. Most of these can be changed to obtain new architectures....
/***************************************************************************\ * * * ___ ___ ___ ___ * / /\ / /\ / /\ / /\ * / /:/ / /::\ / /::\ / /::\ * / /:/ / /:/\:\ / /:/\:\ / /:/\:\ *...
"unlink"]); else if(latencies.find("_unlink") != latencies.end()) x = new unlinkSysCall<issueWidth>(this->processorInstance, latencies["_unlink"]); else x = new unlinkSysCall<issueWidth>(this->processorInstance); registered = this->register_syscall("unlink", *x); ...
/******************************************************************************* * gpio_mf.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * Implements a SystemC model of a generic multi-function GPIO with * ana...
/* * SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. * All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Licen...
#pragma once /** @file report.hpp @brief Reporting macro extensions This is a simplified version of David's reporting extensions. The basic idea is to simplify syntax when reporting on messages more complex than a basic string. Also, simplifies specification of the message type (aka message identifier). See instruc...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #ifndef _DOUBLEUR_ #define _DOUBLEUR_ #include "systemc.h" #include <cstdint> SC_MODULE(DOUBLEUR) { public: sc_in < bool > clock; sc_in < bool > reset; sc_fifo_in ...
//----------------------------------------------------- // A 4 bit up-counter with synchronous active high reset // and with active high enable signal // Example from www.asic-world.com //----------------------------------------------------- #ifndef FIRST_COUNTER_HPP #define FIRST_COUNTER_HPP #include "systemc.h" SC_...
#pragma once #include <systemc.h> using namespace sc_core; class plugin; class timed_callback : public sc_process_b { public: timed_callback( SC_ENTRY_FUNC func, sc_process_host *host, const sc_time &t) : sc_process_b( 0, false, false, func, host, 0) { add_static_event(m_ev); m_e...
//**************************************************************************************** // MIT License //**************************************************************************************** // Copyright (c) 2012-2020 University of Bremen, Germany. // Copyright (c) 2015-2020 DFKI GmbH Bremen, Germany. // Cop...
#ifndef __MESSY_CORE_H__ #define __MESSY_CORE_H__ #include <config.hpp> #include <systemc.h> #include <cstring> #include <string.h> #include <adapters/${adapter_filenames}.hpp> #include <messy_request.hpp> class Core : public sc_module { public: void run(); void close(); void run_next_sc(); void co...
#ifndef SCHEDULER_HPP #define SCHEDULER_HPP #include <systemc.h> #include "verbose.hpp" #define CORE 4 #define INSTRUCTION_BUFFER 512 #define INPUT_BUFFER 65536 SC_MODULE(scheduler_module) { // PORTS sc_in<bool> clk; sc_in<bool> reset; sc_fifo_in<float> from_dma_weight; sc_fifo_in<float> from_dma...
#pragma once #include "systemc.hpp" #include <string> struct Commandline { // Return index if a command-line argument beginning with opt exists; otherwise, zero inline static size_t has_opt( std::string opt ) { for( int i = 1; i < sc_core::sc_argc(); ++i ) { std::string arg{ sc_core::sc_argv()[ i ] };...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #ifndef _trames_separ2_ #define _trames_separ2_ #include "systemc.h" #include <cstdint> #include "constantes.hpp" using namespace std; // #define _DEBUG_SYNCHRO_ SC_MODULE(tr...
// ---------------------------------------------------------------------------- // SystemC SCVerify Flow -- sysc_sim_trans.cpp // // HLS version: 10.4b/841621 Production Release // HLS date: Thu Oct 24 17:20:07 PDT 2019 // Flow Packages: HDL_Tcl 8.0a, SCVerify 10.4 // // Generated by: billyk@cad.eecs.harvar...
_rtl_SIG_weight_in_vec_4_rdy << ccs_rtl_SIG_weight_in_vec_5_rdy << ccs_rtl_SIG_weight_in_vec_6_rdy << ccs_rtl_SIG_weight_in_vec_7_rdy << weight_in_vec[0].Connections::InBlocking<ac_int<8, true >, Connections::SYN_PORT >::msg << weight_in_vec[1].Connections::InBlocking<ac_int<8, true >, Connections::SYN_PORT >::msg << w...
eld_key=accum_out_vec:6bfbc86a-4643-405d-8ac5-31fb9eb3828c-869:rdy:6bfbc86a-4643-405d-8ac5-31fb9eb3828c-888 type_to_vector(accum_out_vec[3].Connections::OutBlocking_Ports_abs<ac_int<32, true > >::rdy.read(),1,t_6bfbc86a_4643_405d_8ac5_31fb9eb3828c_888); // read orig port and type convert ccs_rtl_SIG_accum_out_vec...
/* * SPDX-FileCopyrightText: Copyright (c) 2019-2021 NVIDIA CORPORATION & * AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the ...
/* * Adder.h * SystemC_SimpleAdder * * Created by Le Gal on 07/05/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #include "systemc.h" #include "constantes.hpp" #include "../../Tools/BMP.hpp" #include <string> SC_MODULE(BMPWriter_fixed_acc) { public: sc_fifo_in< sc_uint<32> > addr; sc...
#include <systemc.h> #include <unordered_set> #include <array> #include <string> namespace acs { typedef int Building; typedef int Person; #define NUM_DOORS 6 #define NUM_PERSONS 4 #define NUM_BUILDINGS 4 #define NO_PERSON (-1) #define DEFAULT_BUILDING 0 #define TIMEOUT_RED 5 #define TIMEOUT_GREEN 20 #define TIME_...
/* Print.cpp - Base class that provides print() and println() Copyright (c) 2008 David A. Mellis. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 ...
#include <systemc.h> #include "full_adder.h" #include "tb.h" SC_MODULE( SYSTEM ) { //Module Declarations tb *tb0; full_adder *full_adder0; //Local signal declarations sc_signal<bool> sig_inp_a, sig_inp_b, sig_inp_cin, sig_sum, sig_co; SC_HAS_PROCESS(SYSTEM); SYSTEM( sc_module_name nm) : sc_module (nm...
//**************************************************************************************** // MIT License //**************************************************************************************** // Copyright (c) 2012-2020 University of Bremen, Germany. // Copyright (c) 2015-2020 DFKI GmbH Bremen, Germany. // Cop...
// Copyright 2019 Glenn Ramalho - RFIDo Design // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
/* * SysTop testbench for Harvard cs148/248 only * */ #include "SysTop.h" #include <systemc.h> #include <mc_scverify.h> #include <nvhls_int.h> #include <vector> #define NVHLS_VERIFY_BLOCKS (SysTop) #include <nvhls_verify.h> using namespace::std; #include <testbench/nvhls_rand.h> // W/I/O dimensions const stat...
/******************************************************************************* * sc_main.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * The sc_main is the first function always called by the SystemC environm...
/* * Copyright (C) 2020 GreenWaves Technologies, SAS, ETH Zurich and * University of Bologna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
#include <systemc.h> #include <and.h> #include <testbench.h> int sc_main(int argv, char* argc[]) { sc_time PERIOD(10,SC_NS); sc_time DELAY(10,SC_NS); sc_clock clock("clock",PERIOD,0.5,DELAY,true); And and1("and1"); testbench tb("tb"); sc_signal<bool> a_sg,b_sg,c_sg; and1.a(a_sg); and1.b(b_sg); and1.c(c_s...
/* * SysAttay testbench, for Harvard cs148/248 only */ #include "SysArray.h" #include <systemc.h> #include <mc_scverify.h> #include <nvhls_int.h> #include <vector> #define NVHLS_VERIFY_BLOCKS (SysArray) #include <nvhls_verify.h> using namespace::std; #include <testbench/nvhls_rand.h> // W/I/O dimensions const st...
// nand gate // Luciano Sobral <sobral.luciano@gmail.com> // this sample should fail #include <systemc.h> SC_MODULE(nand_gate) { sc_inout<bool> a; sc_inout<bool> b; sc_out<bool> c; void nand_process(void) { and_process(); // c = a and b c = !c.read(); // c = not c } void and_process ( void ) { c = a...
// nand gate // Luciano Sobral <sobral.luciano@gmail.com> // this sample should fail #include <systemc.h> SC_MODULE(nand_gate) { sc_inout<bool> a; sc_inout<bool> b; sc_out<bool> c; void nand_process(void) { and_process(); // c = a and b c = !c.read(); // c = not c } void and_process ( void ) { c = a...
/* * @ASCK */ #include <systemc.h> SC_MODULE (Mux8) { sc_in <bool> sel; sc_in <sc_int<8>> in0; sc_in <sc_int<8>> in1; sc_out <sc_int<8>> out; /* ** module global variables */ SC_CTOR (Mux8){ SC_METHOD (process); sensitive << in0 << in1 << sel; } ...
/***************************************************************************** Licensed to Accellera Systems Initiative Inc. (Accellera) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Accellera licenses...
/***************************************************************************** Licensed to Accellera Systems Initiative Inc. (Accellera) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Accellera licenses...
/* * @ASCK */ #include <systemc.h> SC_MODULE (WB) { sc_in_clk clk; sc_in <sc_int<8>> prev_alu_result; sc_in <sc_int<8>> prev_mem_result; sc_in <bool> prev_WbMux; sc_in <bool> prev_regWrite; sc_in <sc_uint<3>> prev_rd; sc_out <sc_int<8>> next_alu_result; sc_out <sc_int<8>>...
/* * Main.cpp * * Created on: 13 Jan 2010 * Author: db434 */ #include <systemc.h> #include <stdio.h> #include "Utility/Arguments.h" #include "Utility/BlockingInterface.h" #include "Utility/Debugger.h" #include "Utility/Instrumentation/IPKCache.h" #include "Utility/Instrumentation.h" #include "Utility/Instr...
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2017 Cadence Design Systems, Inc. All rights reserved worldwide. // // The code contained herein is the proprietary and confidential information // of Cadence or its licensors, and is supplied subject to a previously // ...
/***************************************************************************** Licensed to Accellera Systems Initiative Inc. (Accellera) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Accellera licenses...
/****************************************************************************** * * * Copyright (C) 2022 MachineWare GmbH * * All Rights Reserved * ...
/* * Copyright (C) 2020 GreenWaves Technologies, SAS, ETH Zurich and * University of Bologna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
:string &s, char delimiter) { std::vector<std::string> tokens; std::string token; std::istringstream tokenStream(s); while (std::getline(tokenStream, token, delimiter)) { tokens.push_back(token); } return tokens; } vp::config *vp::config::create_config(jsmntok_t *tokens, int *_size)...
(auto& x: this->get_childs()) { x->dump_traces_recursive(file); } } vp::component *vp::__gv_create(std::string config_path, struct gv_conf *gv_conf) { setenv("PULP_CONFIG_FILE", config_path.c_str(), 1); js::config *js_config = js::import_config_from_file(config_path); if (js_config == NUL...
/* * @ASCK */ #include <systemc.h> SC_MODULE (IF) { sc_in_clk clk; sc_in <sc_uint<20>> prev_data; sc_out <sc_uint<20>> next_data; /* ** module global variables */ SC_CTOR (IF){ SC_THREAD (process); sensitive << clk.pos(); } void process () { w...
// BEGIN engine.cpp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // $Copyright: (c)2003-2006 Eklectically, Inc. $ // $License: May be used under the same terms as SystemC library. $ #include <systemc.h> #include <iomanip> //--------------------------------------------------------------------// // This...
/******************************************************************************* * tpencoder.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * This is a testbench module to emulate a rotary quad encoder with a bu...
// #include <QApplication> #include "mainwindow.h" #include "qapplication.h" #include <QVBoxLayout> #include <QHBoxLayout> #include <QSplitter> #include <QPushButton> #include <systemc.h> #include <pthread.h> #include <QList> #include <iostream> #include "scqt_worker.h" // -------------- From "How do I create a paus...
/* Problem 3 Design */ #include<systemc.h> SC_MODULE(communicationInterface) { sc_in<sc_uint<12> > inData; sc_in<bool> clock , reset , clear; sc_out<sc_uint<4> > payloadOut; sc_out<sc_uint<8> > countOut , errorOut; void validateData(); SC_CTOR(communicationInterface) { SC_METHOD(validateData); sensitive<...
#include "systemc.h" #include "cache_pr.h" void cache::address_handler(){ int align; int _address; _address = address.read(); align = (_address & 0x00000003); if(align != 0){ std::cout << "Endereco desalinhado. Vai dar ruim." << std::endl; } else{ address_offset = ((_address >> 2) & 0x0000000F); addres...
#include <systemc.h> #include <string> using namespace sc_core; using namespace std; SC_MODULE(IDE) { // Declare inputs and outputs if needed }; SC_MODULE(PCIx) { // Declare inputs and outputs if needed }; SC_MODULE(ESATA) { public: sc_in<bool> clk; sc_out<std::string> path; void write(const st...
/* * Created on: 21. jun. 2019 * Author: Jonathan Horsted Schougaard */ #ifdef HW_COSIM //#define __GMP_WITHIN_CONFIGURE #endif #define DEBUG_SYSTEMC #define SC_INCLUDE_FX #include <systemc.h> #include "hwcore/tb/cnn/tb_CNN.hpp" unsigned errors = 0; const char simulation_name[] = "tb_CNN"; int sc_main(int ar...
#include "systemc.h" #if 0 #include "first_counter.cpp" #else #include "counter_vhdl.cpp" #endif int sc_main (int argc, char* argv[]) { sc_signal<bool> clock; sc_signal<bool> reset; sc_signal<bool> enable; sc_signal<sc_uint<4> > counter_out; int i = 0; // Connect the DUT first_counter counter("COUN...
#include <systemc.h> #include "Vmmu.h" class mmu_tb_t : public sc_module { public: Vmmu* dut; sc_in<bool> clk_tb; sc_signal<bool> resetb_tb; sc_signal<bool> dm_we_tb; sc_signal<uint32_t> im_addr_tb, dm_addr_tb, dm_di_tb; sc_signal<uint32_t> dm_be_tb; sc_signal<bool> is_signed_tb; sc_signal<uint32_...
/** * Author: Anubhav Tomar * * Robot Navigation Testbench **/ #include<systemc.h> #include<SERVER.h> #include<ROBOT.h> #include<ENVIRONMENT.h> // template < > class _robotNavigation : public sc_module { public: /*Signals for Module Interconnections*/ // FIFO sc_fifo<int> _serverToRobot1 , _envToRobot...
/* ** This file is part of gSysC. ** ** gSysC is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** gSysC is distributed in the hope...
workLine=workLine.erase(0,workLine.find_first_not_of(" ")); variableType=workLine.substr(0,workLine.find_first_of("* ")); workLine=workLine.erase(0,workLine.find(" ")+1); //cout << "--- WorkLine 1: " << workLine << endl; for(int i=0; i<files_vec.size(); i++) { ...
/* Problem 1 Testbench */ #include<systemc.h> #include<sd.cpp> SC_MODULE(sequenceDetectorTB) { sc_signal<bool> clock , reset , clear , input , output , state; void clockSignal(); void resetSignal(); void clearSignal(); void inputSignal(); sequenceDetector* sd; SC_CTOR(sequenceDetectorTB) { sd = n...
#include <crave/SystemC.hpp> #include <crave/ConstrainedRandom.hpp> #include <systemc.h> #include <boost/timer.hpp> using crave::rand_obj; using crave::randv; using sc_dt::sc_bv; using sc_dt::sc_uint; struct ALU12 : public rand_obj { randv< sc_bv<2> > op ; randv< sc_uint<12> > a, b ; ALU12() : op(this), a(t...
//--------Thread function definitions----------------------------- //-----You must modify this file as indicated by TODO comments---- //must include to use the systemc library #include "systemc.h" #include "CPU.h" #include "Block.h" #include "ReadBmp_aux.h" #include <string.h> void CPU::Read_thread(){ cout << sc_tim...
#include <systemc.h> #include <sstream> #include <iomanip> //#include "rom_1024x32_t.hpp" #include "Vcpu_top.h" #include "Vcpu_top_cpu_top.h" #include "Vcpu_top_core_top.h" #include "Vcpu_top_core_top.h" #include "Vcpu_top_core.h" #include "Vcpu_top_regfile.h" #include "Vcpu_top_bram_dpstrobe.h" #include "disasm.h" ...
#include "systemc.h" #include "system.h" #include "noc_if.h" #include "noc_router.h" #include "sc_trace.hpp" noc_router::noc_router(sc_module_name name, uint32_t x, uint32_t y) : sc_module(name), _x(x), _y(y) { SC_THREAD(main); } void noc_router::setup_ctrl() { for (int i = 0; i < NOC_N_RDIR; ++i) { ...
//#define DEBUG //for tracing all internal prints, following are module tracing //#define DEBUG_BATTERY //#define DEBUG_OS //#define DEBUG_SCREEN //#define DEBUG_POWERBUTTON #include "systemc.h" #include "interface.h" #include "user.h" #include "phone.h" int sc_main(int argc, char* argv[]) { // generating th...
/* * SysPE testbench for Harvard cs148/248 only */ #include "SysPE.h" #include <systemc.h> #include <mc_scverify.h> #include <nvhls_int.h> #include <vector> #define NVHLS_VERIFY_BLOCKS (SysPE) #include <nvhls_verify.h> using namespace::std; #include <testbench/nvhls_rand.h> SC_MODULE (Source) { Connections::Ou...
//--------Thread function definitions----------------------------- //-----You must modify this file as indicated by TODO comments---- //must include to use the systemc library #include "systemc.h" #include "JPEG.h" #include "Block.h" #include "ReadBmp_aux.h" void Read_Module::Read_thread(){ cout << sc_time_stamp() <...