text
stringlengths
41
20k
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
//This the top level structural host module //PS, dont forget to link systemc, stdc++, and m #include <systemc.h> #include "fir.h" #include "tb.h" SC_MODULE( SYSTEM ) { //module declarations //Done by doing module_name Pointer_to_instance i.e. name *iname; tb *tb0; fir *fir0; //signal declaration...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/***************************************************************************** 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...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
#include <systemc.h> #include "Producer.h" #include "Consumer.h" int sc_main(int argc, char* argv[]) { // generating the sc_signal sc_signal<int> data_sig; // generating the modules Producer prod1("Producer1"); Consumer cons1("Consumer1"); // connecting modules via signals prod1.data(data_sig); cons1.data(da...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
#include <systemc.h> SC_MODULE (hello_world) { SC_CTOR (hello_world) { } void say_hello() { cout << "Hello World SystemC-2.3.1.\n"; } }; int sc_main(int argc, char* argv[]) { hello_world hello("HELLO"); hello.say_hello(); return(0); }
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/***************************************************************************** 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 2009-2012 Mentor Graphics Corporation // // All Rights Reserved Worldwid // // // // Licensed under the Apache License, Version 2.0 (the ...
/******************************************************************************* * gn_mixed.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * This is a derivative of the sc_signal_resolved class from SystemC * w...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/******************************************************************************* * gpio_mfmix.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * Implements a SystemC model of a generic multi-function GPIO with * ...
/***************************************************************************** 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...
/* Problem 2 Design */ #include<systemc.h> SC_MODULE(counters) { sc_in<sc_uint<8> > in1 , in2 , in3; sc_in<bool> dec1 , dec2 , clock , load1 , load2; sc_out<sc_uint<8> > count1 , count2; sc_out<bool> ended; sc_signal<bool> isOverflow1 , isOverflow2; void handleCount1(); void handleCount2(); void updateEnde...
/***************************************************************************** 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...
#ifndef RGB2GRAY_TLM_CPP #define RGB2GRAY_TLM_CPP #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> #include "rgb2gray_tlm.hp...
//This the top level structural host module //PS, dont forget to link systemc, stdc++, and m #include <systemc.h> #include "fir.h" #include "tb.h" SC_MODULE( SYSTEM ) { //module declarations //Done by doing module_name Pointer_to_instance i.e. name *iname; tb *tb0; fir *fir0; //signal declaration...
/* Problem 3 Testbench */ #include<systemc.h> #include<comm.cpp> SC_MODULE(communicationInterfaceTB) { sc_signal<sc_uint<12> > inData; sc_signal<bool> clock , reset , clear; sc_signal<sc_uint<4> > payloadOut; sc_signal<sc_uint<8> > countOut , errorOut; void clockSignal(); void clearSignal(); void resetSignal...
/****************************************************************************** * * * Copyright (C) 2022 MachineWare GmbH * * All Rights Reserved * ...
#include "PluginFactory.h" #include "PrintITL/PrintITL.h" #include "PrintAML/PrintAML.h" #include "PrintSkeleton/PrintSkeleton.h" #include "PrintDot/PrintDotSimple.h" #include "PrintDot/PrintDotFull.h" #include "PrintDot/PrintDotStates.h" #include "PrintSystemC/PrintSystemC.h" #include "PrintSVA/PrintSVA.h" #include "P...
#include<systemc.h> #include<string> #include<vector> #include<map> #include<fstream> #include<nana/gui.hpp> #include<nana/gui/widgets/button.hpp> #include<nana/gui/widgets/menubar.hpp> #include<nana/gui/widgets/group.hpp> #include<nana/gui/widgets/textbox.hpp> #include<nana/gui/filebox.hpp> #include "top.hpp" #include...
inFile.open(path); if(!inFile.is_open()) show_message("Arquivo inválido","Não foi possível abrir o arquivo!"); else { int i = 0; int value; while(inFile >> value && i < 500) { memor...
#include <string> #include "systemc.h" #include "system.h" #include "sc_trace.hpp" #include "noc_tile.h" // comparison counters uint32_t n_bytes_cmp = 0; uint32_t n_err_bytes = 0; noc_commander::noc_commander(sc_module_name name) : noc_tile(name) { SC_THREAD(main); SC_THREAD(recv_listener); // read bu...
/* * Copyright (c) 2010 TIMA Laboratory * * This file is part of Rabbits. * * Rabbits 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 3 of the License, or * (at your option) any la...
/* This file is part of EXT_systemc Copyright (C) 2017 Julien Thevenon ( julien_thevenon at yahoo.fr ) This program 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 3 of ...
// ************************************************************************************** // User-defined memory manager, which maintains a pool of transactions // From TLM Duolos tutorials // ************************************************************************************** #ifndef TRANSACTION_MEMORY_MANAGER_CPP #...
//----------------------------------------------------- #include "systemc.h" SC_MODULE (ram) { //-----------Internal variables------------------- int * mem; // Constructor for memory //SC_CTOR(ram) { SC_HAS_PROCESS(ram); ram(sc_module_name ram, int size=8) : sc_module(ram) { mem = new int [si...
#include <top.h> #include "systemc.h" int sc_main(int argc, char* argv[]){ sc_time clkprd(10, SC_NS); sc_time clkdly(0, SC_NS); sc_clock clk("clk", clkprd, 0.5, clkdly, true); // sc_signal<bool> reset; top *t; t = new top("top"); t->clk(clk); sc_start(5000, SC_NS); return(0); }
/***************************************************************************** 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...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
#include <fstream> #include <iomanip> #include <iostream> #include "colors.h" #include "cpu.h" #include "elflib.h" #include "systemc.h" #include <unordered_map> /* --------------Main file handling simulation--------------- Arguments : - A riscv-elf executable to load in memory - (optional) --riscof [signature ...
/******************************************************************************** * University of L'Aquila - HEPSYCODE Source Code License * * * * ...
#include <systemc.h> #include "counter.h" #include "counter_tb.h" #include "constants.h" int sc_main(int argc, char* argv[]){ CounterModule* counter = new CounterModule("Counter"); CounterTestbench* testbench = new CounterTestbench("Testbench"); sc_clock Clock("Clock", 10, SC_NS, 0.5, 10, SC_NS, false); sc_si...
/* * Copyright (c) 2010 TIMA Laboratory * * This file is part of Rabbits. * * Rabbits 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 3 of the License, or * (at your option) any la...
/******************************************************************************** * University of L'Aquila - HEPSYCODE Source Code License * * * * ...
#include "systemc.h" #include "system.h" #include "checksum.hpp" #include "noc_if.h" #include "noc_adapter.h" noc_adapter::noc_adapter(sc_module_name name, uint32_t x, uint32_t y) : sc_module(name), _x(x), _y(y), _is_redundant(false), _out_fifo_head(0), _out_fifo_tail(0) {} void noc_adapter::configure_redundanc...
#include <iostream> #include <iomanip> #include "systemc.h" #include "IDFT.h" #include "DFTModule.h" #include "FPU32.h" #include "DSP.h" #include "ALU.h" int sc_main(int argc, char* argv[]) { //General Signals sc_signal<bool> clk; sc_signal<sc_uint<64>> inst; //FFT and IFFT sc_signal<bool> flag_en_IDFT; sc_sig...
//--------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...
/******************************************************************************* * pcf8574.cpp -- Copyright 2020 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * This is a crude model for the PN532 with firmware v1.6. It will work fo...
//**************************************************************************************** // MIT License //**************************************************************************************** // Copyright (c) 2012-2020 University of Bremen, Germany. // Copyright (c) 2015-2020 DFKI GmbH Bremen, Germany. // Cop...
//----------------------------------------------------- // This is my second Systemc Example // Design Name : first_counter // File Name : first_counter.cpp // Function : This is a 4 bit up-counter with // Synchronous active high reset and // with active high enable signal //--------------------------------------------...
#include <systemc.h> #include "counter.cpp" 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("COUNTER"); counter.clock(clock); counter.reset(re...
/******************************************************************************* * esp_wifi.cpp -- Copyright 2019 Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * This file ports the esp_wifi functions for the ESP32 to the ESPMOD SystemC...
@param primary store current primary channel * @param[out] second store current second channel * * @return * - ESP_OK: succeed * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_INVALID_ARG: invalid argument */ esp_err_t esp_wifi_get_channel(uint8_t *primary,...
IFI_IF_STA or WIFI_IF_AP. If the ifx is wrong, the API returns ESP_ERR_WIFI_IF. * @param buffer raw ieee80211 buffer * @param len the length of raw buffer, the len must be <= 1500 Bytes and >= 24 Bytes * @param en_sys_seq indicate whether use the internal sequence number. If en_sys_seq is false, the ...
/************************************************************************** * * * Catapult(R) Machine Learning Reference Design Library * * * * Software Ver...
//**************************************************************************************** // MIT License //**************************************************************************************** // Copyright (c) 2012-2020 University of Bremen, Germany. // Copyright (c) 2015-2020 DFKI GmbH Bremen, Germany. // Cop...
/****************************************************** * This is the main file for the mips1 ArchC model * * This file is automatically generated by ArchC * * WITHOUT WARRANTY OF ANY KIND, either express * * or implied. * * For more information on ArchC, please...
/***************************************************************************** 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 2009-2012 Mentor Graphics Corporation // // All Rights Reserved Worldwid // // // // Licensed under the Apache License, Version 2.0 (the ...
/******************************************************************************* * dns.cpp -- Copyright 2019 Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * This is a stubfile that sets several defines for a simplified version of * t...
#ifndef IMG_ROUTER_CPP #define IMG_ROUTER_CPP // #include "tlm_transaction.cpp" #include "transaction_memory_manager.cpp" #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_socke...
/******************************************************************************* * i2c.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * Model for a I2C. *********************************************************...
#include <string> #include <algorithm> #include <sstream> #include <vector> #include <systemc.h> #include "sc_qt_adaptor.h" #include "sc_config.h" #include "sc_run.h" #include "sc_debug_object.h" void scQtAdaptor::trace_module (sc_module *module) { auto children = module->get_child_objects(); sc_object * o; ...
#ifndef PACKET_GENERATOR_CPP #define PACKET_GENERATOR_CPP #include <systemc-ams.h> #include <systemc.h> #include "packetGenerator.h" void packetGenerator::set_attributes() { // Set a timestep for the TDF module set_timestep(sample_time); } void packetGenerator::fill_data(unsigned char* data, int packet_lengt...
#ifndef IMG_TARGET_CPP #define IMG_TARGET_CPP #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> #include "common_func.hpp" #...
/******************************************************************************** * University of L'Aquila - HEPSYCODE Source Code License * * * * ...
#ifndef IMG_TARGET_CPP #define IMG_TARGET_CPP #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> #include "common_func.hpp" #...
/******************************************************************************* * mux_in.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design ******************************************************************************* * Description: * Model for the PCNT mux in the GPIO matrix. ******************************...
#include <systemc.h> #include <string> #include <vector> #include <map> #include <fstream> #include <nana/gui.hpp> #include <nana/gui/widgets/button.hpp> #include <nana/gui/widgets/menubar.hpp> #include <nana/gui/widgets/group.hpp> #include <nana/gui/widgets/textbox.hpp> #include <nana/gui/filebox.hpp> #include "top.hp...
&& i < 32) { reg_gui.at(i).text(1, std::to_string(value)); i++; } for (; i < 32; i++) reg_gui.at(i).text(1, "0"); inFile.close(); } }); bench_sub->append("Bubble Sort", [&](menu::item_proxy &ip) ...
/***************************************************************************** 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...
/***************************************************************************** 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...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
/////////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // / _(_) | | | | // // __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ...
// ================================================================ // NVDLA Open Source Project // // Copyright(c) 2016 - 2017 NVIDIA Corporation. Licensed under the // NVDLA Open Hardware License; Check "LICENSE" which comes with // this distribution for more information. // =======================================...
//***** Convert FP17 to FP32 ****** ac_channel<vFp17Type> chn_a; chn_a.write(icvt_data_out[i]); HLS_fp17_to_fp32(chn_a, fp17tofp32_out[i]); icvt_data_out_fp32[i] = fp17tofp32_out[i].read(); ac_channel<vFp32Type> chn_b, chn_c; chn_b.write(icvt_data_out_fp32[i]...
/***************************************************************************** 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...