text stringlengths 41 20k |
|---|
#ifndef IPS_FILTER_LT_MODEL_HPP
#define IPS_FILTER_LT_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>
#ifdef USING_TLM_TB_EN
#include "ips_filter_defines.hpp"
#endif // USING_TLM_TB_EN
/**
* @brief Filter modul... |
#ifdef EDGE_DETECTOR_AT_EN
#ifndef SOBEL_EDGE_DETECTOR_HPP
#define SOBEL_EDGE_DETECTOR_HPP
#include <systemc.h>
#include "address_map.hpp"
SC_MODULE(Edge_Detector)
{
#ifndef USING_TLM_TB_EN
sc_inout<sc_uint<64>> data;
sc_in<sc_uint<24>> address;
#else
sc_uint<64> data;
sc_uint<64> address;
#endif // USING_... |
#ifndef RGB2GRAY_TLM_HPP
#define RGB2GRAY_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>
#include "rgb2gray_pv_mod... |
#ifndef IPS_FILTER_LT_MODEL_HPP
#define IPS_FILTER_LT_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>
#define IPS_FILTER_KERNEL_SIZE 3
#define DELAY_TIME (IPS_FILTER_KERNEL_SIZE * IPS_FILTER_KERNEL_SIZE * 1) + 4 ... |
#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... |
/*
* @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>>... |
/* Copyright 2017 Columbia University, SLD Group */
//
// tb.h - Robert Margelli
// Testbench header file.
//
#ifndef __TB__H
#define __TB__H
#include <time.h>
#include <systemc.h>
#include "cynw_flex_channels.h"
#include <esc.h>
#include "hl5_datatypes.hpp"
#include "globals.hpp"
#include "defines.hpp"
SC_MODUL... |
// Copyright (c) 2011-2024 Columbia University, System Level Design Group
// SPDX-License-Identifier: MIT
#ifndef __ESP_SYSTEMC_HPP__
#define __ESP_SYSTEMC_HPP__
// Fixed point
#if defined(SC_FIXED_POINT) || defined(SC_FIXED_POINT_FAST)
// Using SystemC fixed point
#define SC_INCLUDE_FX
#include <systemc.h>
#else... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _Tripleur_
#define _Tripleur_
#include "systemc.h"
#include <cstdint>
SC_MODULE(Tripleur)
{
public:
sc_in < bool > clock;
sc_in < bool > reset;
sc_fifo_in ... |
/* Copyright 2017 Columbia University, SLD Group */
//
// system.h - Robert Margelli
// Top-level model header file.
// Instantiates the CPU, TB, IMEM, DMEM.
//
#ifndef SYSTEM_H_INCLUDED
#define SYSTEM_H_INCLUDED
#include <systemc.h>
#include "cynw_flex_channels.h"
#include "hl5_datatypes.hpp"
#include "defines.hp... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _ModuleCompute_
#define _ModuleCompute_
#include "systemc.h"
#include <cstdint>
SC_MODULE(ModuleCompute)
{
public:
sc_in < bool > clock;
sc_in < bool > reset;
... |
#include <systemc.h>
#include <systemc-ams.h>
#include <config.hpp>
#define ${sensor_name}_VREF ${vref}
SCA_TDF_MODULE(Sensor_${sensor_name}_power)
{
//Data from Functional Instance
sca_tdf::sc_in <int> func_signal;
//Data to Power Bus
sca_tdf::sca_out <double> voltage_state;
sca_tdf::sca_out <do... |
#ifdef EDGE_DETECTOR_LT_EN
#ifndef SOBEL_EDGE_DETECTOR_HPP
#define SOBEL_EDGE_DETECTOR_HPP
#include <systemc.h>
SC_MODULE(Edge_Detector)
{
int localWindow[3][3];
const int sobelGradientX[3][3] = {{-1, 0, 1},
{-2, 0, 2},
{-1, 0, 1}... |
/***************************************************************************\
*
*
* ___ ___ ___ ___
* / /\ / /\ / /\ / /\
* / /:/ / /::\ / /::\ / /::\
* / /:/ / /:/\:\ / /:/\:\ / /:/\:\
*... |
// Copyright (c) 2011-2021 Columbia University, System Level Design Group
// SPDX-License-Identifier: Apache-2.0
#ifndef __GEMM_ACCELERATOR_CONF_INFO_HPP__
#define __GEMM_ACCELERATOR_CONF_INFO_HPP__
#include <systemc.h>
//
// Configuration parameters for the accelerator.
//
class conf_info_t
{
public:
//
//... |
#ifndef IMG_RECEIVER_TLM_HPP
#define IMG_RECEIVER_TLM_HPP
#include <systemc.h>
#include "img_receiver.hpp"
#include "../src/img_target.cpp"
#include "address_map.hpp"
struct img_receiver_tlm: public img_receiver, public img_target
{
img_receiver_tlm(sc_module_name name) : img_receiver((std::string(name) + "_recei... |
/*
* 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... |
/*
* Created on: 21. jun. 2019
* Author: Jonathan Horsted Schougaard
*/
#pragma once
#define SC_INCLUDE_FX
#include <systemc.h>
//#if __RTL_SIMULATION__
//#include "cnn_rtl_wrapper.h"
//#else
//#include "hwcore/cnn/cnn.h"
//#endif
#include "hwcore/cnn/cnn.h"
#include "hwcore/hf/helperlib.h"
#include "hwcore/p... |
#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 (... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _Detecteur_
#define _Detecteur_
#include "systemc.h"
#include <cstdint>
#include "Doubleur_uint.hpp"
#include "trames_separ.hpp"
#include "Seuil_calc.hpp"
// #define _... |
#ifdef RGB2GRAY_PV_EN
#ifndef RGB2GRAY_HPP
#define RGB2GRAY_HPP
#include <systemc.h>
SC_MODULE(Rgb2Gray)
{
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char gray_value;
SC_CTOR(Rgb2Gray)
{
}
void set_rgb_pixel(unsigned char r_val, unsigned char g_val, unsigned char b_val);
voi... |
#ifndef MEMORY_TLM_HPP
#define MEMORY_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>
#include "../src/img_target.c... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _DownSampling_
#define _DownSampling_
#include "systemc.h"
#include <cstdint>
#include "constantes.hpp"
SC_MODULE(DownSampling)
{
public:
sc_in < bool > clock;
... |
#ifndef IMG_TRANSMITER_TLM_HPP
#define IMG_TRANSMITER_TLM_HPP
#include <systemc.h>
#include "img_transmiter.hpp"
#include "../src/img_target.cpp"
#include "address_map.hpp"
struct img_transmiter_tlm: public img_transmiter, public img_target
{
SC_CTOR(img_transmiter_tlm): img_transmiter(img_transmiter::name()), im... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _BitsToBytes_
#define _BitsToBytes_
#include "systemc.h"
#include <cstdint>
SC_MODULE(BitsToBytes)
{
public:
sc_in < bool > clock;
sc_in < bool > reset;
sc... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _Seuil_calc_
#define _Seuil_calc_
#include "systemc.h"
#include <cstdint>
#include "constantes.hpp"
using namespace std;
// #define _DEBUG_SYNCHRO_
SC_MODULE(Seuil_ca... |
#include <systemc.h>
#include <config.hpp>
SC_MODULE(Functional_bus){
//Input Port
sc_core::sc_in <int> request_address;
sc_core::sc_in <int> request_data;
sc_core::sc_in <bool> flag_from_core;
sc_core::sc_in <bool> request_ready;
sc_core::sc_in <int> data_input_sensor[NUM_SENSORS];
sc_... |
//--------------------------------------------------------
//Testbench: Unification
//By: Roger Morales Monge
//Description: Simple TB for pixel unification modules
//--------------------------------------------------------
#ifndef USING_TLM_TB_EN
#define STB_IMAGE_IMPLEMENTATION
#include "include/stb_image.h"
#define... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _BitDecider_
#define _BitDecider_
#include "systemc.h"
#include <cstdint>
SC_MODULE(BitDecider)
{
public:
sc_in < bool > clock;
sc_in < bool > reset;
sc_fi... |
#include <systemc.h>
#include <systemc-ams.h>
#include <config.hpp>
#define ${sensor_name}_VREF ${vref}
SCA_TDF_MODULE(Sensor_${sensor_name}_power)
{
//Data from Functional Instance
sca_tdf::sc_in <int> func_signal;
//Data to Power Bus
sca_tdf::sca_out <double> voltage_state;
sca_tdf::sca_out <do... |
#ifdef EDGE_DETECTOR_LT_EN
#ifndef SOBEL_EDGE_DETECTOR_HPP
#define SOBEL_EDGE_DETECTOR_HPP
#include <systemc.h>
SC_MODULE(Edge_Detector)
{
int localWindow[3][3];
const int sobelGradientX[3][3] = {{-1, 0, 1},
{-2, 0, 2},
{-1, 0, 1}... |
/* Copyright 2017 Columbia University, SLD Group */
// memwb.h - Robert Margelli
// memory+writeback stage header file.
#ifndef __MEMWB__H
#define __MEMWB__H
#include <systemc.h>
#include "cynw_flex_channels.h"
#include "defines.hpp"
#include "globals.hpp"
#include "syn_directives.hpp"
#include "hl5_datatypes.hpp"... |
#ifndef __RBM_H_
#define __RBM_H_
#include "systemc.h"
#include <ctos_flex_channels.h>
//This macro includes fixed-point into SystemC
#if defined(SC_FIXED_POINT)
#define SC_INCLUDE_FX
#endif
#if defined(__CTOS__) || defined(CTOS_MODEL) || defined(CTOS_SC_FIXED_POINT)
#include <ctos_fx/ctos_fx_macros.h>
#endif
#incl... |
#include<systemc.h>
#include<vector>
#include "interfaces.hpp"
#include<nana/gui/widgets/listbox.hpp>
using std::vector;
class instruction_queue: public sc_module
{
public:
sc_port<read_if> in;
sc_port<write_if_f> out;
SC_HAS_PROCESS(instruction_queue);
instruction_queue(sc_module_name name, vect... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _CRCCheck_
#define _CRCCheck_
#include "systemc.h"
#include <cstdint>
#include "constantes.hpp"
SC_MODULE(CRCCheck)
{
public:
sc_in < bool > clock;
sc_in < ... |
/***************************************************************************\
*
*
* ___ ___ ___ ___
* / /\ / /\ / /\ / /\
* / /:/ / /::\ / /::\ / /::\
* / /:/ / /:/\:\ / /:/\:\ / /:/\:\
*... |
#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 <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 "ips_filter_... |
#include <time.h>
#include "systemc.h"
#ifndef SC_FAULT_INJECT_HPP
#define SC_FAULT_INJECT_HPP
/** Representation of variable to be upset. */
struct fault_injectable_variable_t {
char *name; // name
uint8_t *ptr; // pointer to variable
uint32_t size; // size
uint... |
#ifndef USING_TLM_TB_EN
#define int64 systemc_int64
#define uint64 systemc_uint64
#include <systemc.h>
#undef int64
#undef uint64
#define int64 opencv_int64
#define uint64 opencv_uint64
#include <opencv2/opencv.hpp>
#undef int64
#undef uint64
#include "vga.hpp"
// Image path
#define IPS_IMG_PATH_TB "../../tools/d... |
// half - IEEE 754-based half-precision floating-point library.
//
// Copyright (c) 2012-2021 Christian Rau <rauy@users.sourceforge.net>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software wi... |
ts<const volatile T> : bits<T> {
};
#if HALF_ENABLE_CPP11_CSTDINT
/// Unsigned integer of (at least) 16 bits width.
typedef std::uint_least16_t uint16;
/// Fastest unsigned integer of (at least) 32 bits width.
typedef std::uint_fast32_t uint32;
/// Fastest signed integer of (at least) 32 bits width.
type... |
0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF,
0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF,
0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBFF, 0xFBF... |
000, 0x385AC000,
0x385B0000, 0x385B4000, 0x385B8000, 0x385BC000, 0x385C0000,
0x385C4000, 0x385C8000, 0x385CC000, 0x385D0000, 0x385D4000,
0x385D8000, 0x385DC000, 0x385E0000, 0x385E4000, 0x385E8000,
0x385EC000, 0x385F0000, 0x385F4000, 0x385F8000, 0x385FC000,
0x3... |
else if (abs == 0x7C00)
out = std::numeric_limits<T>::has_infinity ?
std::numeric_limits<T>::infinity() :
std::numeric_limits<T>::max();
else if (abs > 0x3FF)
out = std::ldexp(static_cast<T>((abs & 0x3FF) | 0x400),
(abs >> 10) - 25);
else
... |
OW on overflows
/// \exception FE_UNDERFLOW on underflows
/// \exception FE_INEXACT if no other exception occurred
template<std::float_round_style R, bool S> unsigned int area(unsigned int arg) {
int abs = arg & 0x7FFF, expx = (abs >> 10) + (abs <= 0x3FF) - 15,
expy = -15, ilog, i;
uint32 mx = stati... |
ace literal
{
/// Half literal.
/// While this returns a properly rounded half-precision value, half literals can unfortunately not be constant
/// expressions due to rather involved conversions. So don't expect this to be a literal literal without involving
/// conversion operations at runtime. It is... |
second operand
/// \return remainder of floating-point division.
/// \exception FE_INVALID if \a x is infinite or \a y is 0 or if \a x or \a y is signaling NaN
inline half fmod(half x, half y) {
unsigned int absx = x.data_ & 0x7FFF, absy = y.data_ & 0x7FFF, sign =
x.data_ & 0x8000;
if (absx >= 0x7C0... |
etail::binary, 0);
for (exp = 14; m < 0x8000000 && exp; m <<= 1, --exp)
;
for (; m > 0xFFFFFFF; m >>= 1, ++exp)
s |= m & 1;
return half(detail::binary,
detail::fixed2half<half::round_style, 27, false, false, true>(m,
exp, sign & 0x8000, s));
#endif
}
/// Natu... |
3:
sc = std::make_pair(-sc.second, sc.first);
break;
}
*sin = half(detail::binary,
detail::fixed2half<half::round_style, 30, true, true, true>(
(sc.first ^ -static_cast<detail::uint32>(sign))
+ sign));
... |
half(detail::binary, detail::signal(arg.data_)) : arg;
if (abs <= 0x2900)
return half(detail::binary,
detail::rounded<half::round_style, true>(arg.data_ - 1, 1, 1));
if (half::round_style != std::round_to_nearest)
switch (abs) {
case 0x32D4:
return half(det... |
signaling NaN
/// \exception FE_OVERFLOW for infinite result from finite argument
/// \exception FE_UNDERFLOW for subnormal result
inline half nextafter(half from, half to) {
int fabs = from.data_ & 0x7FFF, tabs = to.data_ & 0x7FFF;
if (fabs > 0x7C00 || tabs > 0x7C00)
return half(detail::binary, detail... |
#pragma once
#include "systemc.hpp"
#include "common.hpp"
#include <memory>
// Forward declarations
struct Objector_module;
struct Stimulus_module;
template<typename T> struct Splitter_module;
struct Behavior_module;
struct Observer_module;
struct Top_module: sc_core::sc_module
{
std::unique_ptr<Objector_module> ... |
#pragma once
#include "systemc.hpp"
#include <string>
struct Commandline
{
// Return index if a command-line argument beginning with opt exists; otherwise, zero
// Optional index may be used to continue scanning from previous scan (0 =>
// start from first)
inline static size_t has_opt( std::string& opt, int ... |
#pragma once
#include<string>
#include<systemc.h>
using std::string;
class write_if_f: virtual public sc_interface
{
public:
virtual void write(string) = 0;
virtual void nb_write(string) = 0;
};
class read_if_f: virtual public sc_interface
{
public:
virtual void read(string &) = 0;
... |
/***************************************************************************\
*
*
* ___ ___ ___ ___
* / /\ / /\ / /\ / /\
* / /:/ / /::\ / /::\ / /::\
* / /:/ / /:/\:\ / /:/\:\ / /:/\:\
*... |
#include <iostream>
#include <systemc.h>
int run_simple_simulation(unsigned long int stack); |
#include <systemc.h>
#include <config.hpp>
SC_MODULE(Functional_bus){
//Input Port
sc_core::sc_in <unsigned int> request_address;
sc_core::sc_in <uint8_t*> request_data;
sc_core::sc_in <bool> flag_from_core;
sc_core::sc_in <bool> request_ready;
sc_core::sc_in <unsigned int> request_size;
... |
#ifndef IMG_SAVER_TLM_HPP
#define IMG_SAVER_TLM_HPP
#include <systemc.h>
#include "../src/img_target.cpp"
#include "address_map.hpp"
struct img_saver_tlm: public img_target
{
img_saver_tlm(sc_module_name name) : img_target((std::string(name) + "_target").c_str()) {
set_mem_attributes(IMG_SAVER_ID_ADDRESS_... |
#ifndef PACKET_GENERATOR_TLM_HPP
#define PACKET_GENERATOR_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>
#include ... |
#ifndef IPS_SEQ_ITEM_AMS_HPP
#define IPS_SEQ_ITEM_AMS_HPP
#define int64 systemc_int64
#define uint64 systemc_uint64
#include <systemc.h>
#include <systemc-ams.h>
#undef int64
#undef uint64
#define int64 opencv_int64
#define uint64 opencv_uint64
#include <opencv2/opencv.hpp>
#undef int64
#undef uint64
// Image path
#d... |
#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 ALU24 : public rand_obj {
randv< sc_bv<2> > op ;
randv< sc_uint<24> > a, b ;
ALU24()
: op(this), a(t... |
#include<systemc.h>
#include<vector>
#include "interfaces.hpp"
#include<nana/gui/widgets/listbox.hpp>
using std::vector;
class instruction_queue: public sc_module
{
public:
sc_port<read_if> in;
sc_port<write_if_f> out;
SC_HAS_PROCESS(instruction_queue);
instruction_queue(sc_module_name name, vect... |
#include <time.h>
#include "systemc.h"
#ifndef SC_FAULT_INJECT_HPP
#define SC_FAULT_INJECT_HPP
/** Representation of variable to be upset. */
struct fault_injectable_variable_t {
char *name; // name
uint8_t *ptr; // pointer to variable
uint32_t size; // size
uint... |
#pragma once
#include<string>
#include<systemc.h>
using std::string;
class write_if_f: virtual public sc_interface
{
public:
virtual void write(string) = 0;
virtual void nb_write(string) = 0;
};
class read_if_f: virtual public sc_interface
{
public:
virtual void read(string &) = 0;
... |
#ifndef TOP_HPP
#define TOP_HPP
#include <systemc.h>
#include "scheduler.hpp"
#include "processing_engine.hpp"
#include "verbose.hpp"
#define CORE_BIND(NAME, INDEX) \
NAME.clk(clk); \
NAME.reset(reset); \
NAME.from_scheduler_i... |
#ifndef IPS_VGA_TLM_HPP
#define IPS_VGA_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>
#include "common_func.hpp"
... |
/*
* Created on: 21. jun. 2019
* Author: Jonathan Horsted Schougaard
*/
#pragma once
#define SC_INCLUDE_FX
#include <systemc.h>
#include "DMA_data_types.h"
#include "score_lib.h"
#include <list>
#include <algorithm>
#include <math.h>
class monitor_logger
{
static std::vector<sc_time> &getInEList()
{
stat... |
// Copyright (c) 2011-2024 Columbia University, System Level Design Group
// SPDX-License-Identifier: MIT
#ifndef __ESP_HANDSHAKE_HPP__
#define __ESP_HANDSHAKE_HPP__
#if defined(USE_CYNW_P2P)
// Using cynw_p2p library
#include "cynw_p2p.h"
// Forward declaration
class handshake_t;
// Handshake request
class han... |
/***************************************************************************\
*
*
* ___ ___ ___ ___
* / /\ / /\ / /\ / /\
* / /:/ / /::\ / /::\ / /::\
* / /:/ / /:/\:\ / /:/\:\ / /:/\:\
*... |
/*
* readwrite_if.hpp
*
* Created on: Jun 14, 2014
* Author: Pimenta
*/
#ifndef READWRITE_IF_HPP_
#define READWRITE_IF_HPP_
// lib
#include <systemc.h>
struct readwrite_if : public sc_module, public sc_interface {
protected:
uint32_t start_addr;
public:
readwrite_if(uint32_t start_addr);
... |
/*
* Copyright (C) 2024 Commissariat à l'énergie atomique et aux énergies alternatives (CEA)
* 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... |
rn stat;
break;
case PutI:
assert (isHit);
assert (line->getState()==Shared);
line->setState(Invalid);
NPutI++;
return stat;
break;
default:
break;
}
// Writeback dirty line to make room for allocating requests
if (!isHit && line->getState()!=Invalid &... |
].Sharers.erase(id);
if (Directory[line->getAddress()].Sharers.size()==0) {// Last PutS
Directory[line->getAddress()] = { Invalid, NULL_IDX, {} };
if (InclusionOfHigher==Exclusive) line->setState(Shared);
}
break;
}
assert (Directory[line->... |
mp, nullptr);
}
virtual inline tlm::tlm_response_status AccessFwdGetS (unsigned char* data_ptr, AddressType addr, size_t size, idx_t initiatorId, sc_time& delay, sc_time timestamp){
if (DataSupport) return accessCache<FwdGetS>(data_ptr, size, addr, initiatorId, delay, timestamp, nullptr);
else ... |
/*******************************************************************************
* sc_main.cpp -- Copyright 2019 (c) Glenn Ramalho - RFIDo Design
*******************************************************************************
* Description:
* The sc_main is the first function always called by the SystemC environm... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _Seuil_calc1_
#define _Seuil_calc1_
#include "systemc.h"
#include <cstdint>
#include "constantes.hpp"
using namespace std;
// #define _DEBUG_SYNCHRO_
SC_MODULE(Seuil_... |
#include <systemc.h>
//
#include "hwcore/hf/helperlib.h"
#include <random>
#define sc_fifo hwcore::hf::sc_fifo_with_trace
//
#include "hwcore/cnn/cnn.h"
#include "hwcore/pipes/data_types.h"
#include <cmath>
SC_MODULE(tb_cnn_2d) {
#if __RTL_SIMULATION__
// DMA_performance_tester_rtl_wrapper u1;
#else
// DMA_performa... |
ta_W * (1 + Yindx_cut) - 1, P_data_W * Yindx_cut));
if ((px == 0 && py == 0) || exp_fix < exp_fix_tmp) {
exp_fix = exp_fix_tmp;
}
std::cout << "exp pool [" << px << "," << py << "] [exp_fix, exp_tmp]=["
<< exp_fix.to_float() << ", " << exp_fix_tmp.to_float() << "]" << ... |
------------------------------<<<" << std::endl;
}
int do_pool(dma_pkg & X, dma_pkg & Y, int depth, int row_size, int stride, int X_N, int window, int zp) {
// ofstream of;
// of.open("result.txt");
sc_time start = sc_time_stamp();
sc_assert(depth % pe_bw == 0);
int depth_raw = depth / pe_bw;
int db_rep... |
#ifndef SYSTEMC_EXAMPLES_COUNTER_HPP
#define SYSTEMC_EXAMPLES_COUNTER_HPP
#include <systemc.h>
using namespace sc_core;
/**
* @brief Construct a new Counter module object.
*
* Count is only during positive edges of the clock.
* Reset is only during 1'b0. After reset asserts, it goes out of reset.
* Enable mus... |
#ifndef SOBEL_EDGE_DETECTOR_HPP
#define SOBEL_EDGE_DETECTOR_HPP
#define USING_TLM_TB_EN
#include <systemc.h>
SC_MODULE(Edge_Detector)
{
#ifndef USING_TLM_TB_EN
sc_inout<sc_uint<64>> data;
sc_in<sc_uint<24>> address;
#else
sc_uint<64> data;
sc_uint<24> address;
#endif // USING_TLM_TB_EN
const double de... |
#ifndef IPS_SEQ_ITEM_VGA_HPP
#define IPS_SEQ_ITEM_VGA_HPP
#define int64 systemc_int64
#define uint64 systemc_uint64
#include <systemc.h>
#include <systemc-ams.h>
#undef int64
#undef uint64
#define int64 opencv_int64
#define uint64 opencv_uint64
#include <opencv2/opencv.hpp>
#undef int64
#undef uint64
#include "vunit.... |
#ifndef IPS_SEQ_ITEM_VGA_HPP
#define IPS_SEQ_ITEM_VGA_HPP
#define int64 systemc_int64
#define uint64 systemc_uint64
#include <systemc.h>
#include <systemc-ams.h>
#undef int64
#undef uint64
#define int64 opencv_int64
#define uint64 opencv_uint64
#include <opencv2/opencv.hpp>
#undef int64
#undef uint64
#include "vunit.... |
/*
* Created on: 21. jun. 2019
* Author: Jonathan Horsted Schougaard
*/
#pragma once
#define SC_INCLUDE_FX
#include <systemc.h>
#include "hwcore/pipes/streamsplit.h"
#include "hwcore/pipes/streammerge.h"
#include "hwcore/pipes/streamresize.h"
#include "hwcore/pipes/data_types.h"
#if __RTL_SIMULATION__
//#inc... |
#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... |
/*
* MIPS.hpp
*
* Created on: Jun 14, 2014
* Author: Pimenta
*/
#ifndef MIPS_HPP_
#define MIPS_HPP_
// lib
#include <systemc.h>
// local
#include "Context.hpp"
#include "Thread.hpp"
#include "readwrite_if.hpp"
struct Bitmap {
uint16_t unused0;
uint16_t magic_number;
uint32_t file_size;
uint32_t r... |
/***************************************************************************\
*
*
* ___ ___ ___ ___
* / /\ / /\ / /\ / /\
* / /:/ / /::\ / /::\ / /::\
* / /:/ / /:/\:\ / /:/\:\ / /:/\:\
*... |
#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 ALU32 : public rand_obj {
randv< sc_bv<2> > op ;
randv< sc_uint<32> > a, b ;
ALU32()
: op(this), a(t... |
#pragma once
/** @class Splitter_module
@brief Splits an incoming data stream into two or three parts.
Simplified block diagram
------------------------
```
fifo_port<T> _____ ____ fifo_export<T>
\ /
Splitter_module --- sig1_export<T>
signal_port<T> ___/... |
#ifdef EDGE_DETECTOR_PV_EN
#ifndef SOBEL_EDGE_DETECTOR_HPP
#define SOBEL_EDGE_DETECTOR_HPP
#include <systemc.h>
SC_MODULE(Edge_Detector)
{
int localWindow[3][3];
const int sobelGradientX[3][3] = {{-1, 0, 1},
{-2, 0, 2},
{-1, 0, 1}};... |
/*
* Adder.h
* SystemC_SimpleAdder
*
* Created by Le Gal on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#ifndef _Seuil_calc2_
#define _Seuil_calc2_
#include "systemc.h"
#include <cstdint>
#include "constantes.hpp"
using namespace std;
// #define _DEBUG_SYNCHRO_
SC_MODULE(Seuil_... |
/*
* 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 ... |
c_gen_unique_name("im_from_specific")))
// ,ic(ic_)
,
im(sc_gen_unique_name("im")),
p(p_),
int_msg("int_msg"),
int_rdy("int_rdy"),
int_val("int_val") {
// Pass up to handler interface
this->im_ptr = &im;
p._DATNAME_(int_msg);
p._RDYNAME_(int_rdy);... |
eeds number of sources");
return srcs[src_idx];
}
idx_t get_real_dest_idx(idx_t dest_idx, dest_map_idx_t dest_map_idx = 0) {
idx_t real_dest_idx;
if (dest_map_idx == 0) {
real_dest_idx = dest_idx;
} else {
// Assert that dest_map_idx map exists
NVHLS_ASSERT_MSG(
std::f... |
k")),
rst(sc_gen_unique_name("rst")) {
SC_CTHREAD(input_dec_run, clk.pos());
async_reset_signal_is(rst, false);
}
void input_dec_run() {
IM data;
// Reset input
channels_begin[p]->ResetRead();
// Check if we have valid outputs.
switch (ic.num_compatible_ch... |
bs *, width_t> type_width_dests;
std::map<Connections::Blocking_abs *, const char *> type_name_dests;
std::map<Connections::Blocking_abs *, const char *> msg_name_dests;
std::map<Connections::Blocking_abs *, GenericSrcHandlerIface<IM_t> *>
generic_iface_srcs;
std::map<Connections::Blocking_abs *, MSG_ID_... |
#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... |
/*
* Created on: 21. jun. 2019
* Author: Jonathan Horsted Schougaard
*/
#pragma once
#define SC_INCLUDE_FX
#include "hwcore/pipes/pipes.h"
#include <systemc.h>
#if __RTL_SIMULATION__
//#include "DMA_performance_tester_rtl_wrapper.h"
//#else
//#include "DMA_generic_performance_tester.hpp"
#endif
const long ... |
// Copyright (c) 2011-2024 Columbia University, System Level Design Group
// SPDX-License-Identifier: Apache-2.0
#ifndef __CACHE_TYPES_HPP__
#define __CACHE_TYPES_HPP__
#include <stdint.h>
#include <sstream>
#include "math.h"
#include "systemc.h"
#include "cache_consts.hpp"
/*
* Cache data types
*/
typedef sc_ui... |
_id(0),
to_req(0),
addr(0),
line(0)
{}
inline l2_rsp_out_t& operator = (const l2_rsp_out_t& x) {
coh_msg = x.coh_msg;
req_id = x.req_id;
to_req = x.to_req;
addr = x.addr;
line = x.line;
return *this;
}
inline bool operator == (const l2_rsp_out_t& x) const {
return (x.coh_msg == co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.