112855Sgabeblack@google.com/***************************************************************************** 212855Sgabeblack@google.com 312855Sgabeblack@google.com Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 412855Sgabeblack@google.com more contributor license agreements. See the NOTICE file distributed 512855Sgabeblack@google.com with this work for additional information regarding copyright ownership. 612855Sgabeblack@google.com Accellera licenses this file to you under the Apache License, Version 2.0 712855Sgabeblack@google.com (the "License"); you may not use this file except in compliance with the 812855Sgabeblack@google.com License. You may obtain a copy of the License at 912855Sgabeblack@google.com 1012855Sgabeblack@google.com http://www.apache.org/licenses/LICENSE-2.0 1112855Sgabeblack@google.com 1212855Sgabeblack@google.com Unless required by applicable law or agreed to in writing, software 1312855Sgabeblack@google.com distributed under the License is distributed on an "AS IS" BASIS, 1412855Sgabeblack@google.com WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1512855Sgabeblack@google.com implied. See the License for the specific language governing 1612855Sgabeblack@google.com permissions and limitations under the License. 1712855Sgabeblack@google.com 1812855Sgabeblack@google.com *****************************************************************************/ 1912855Sgabeblack@google.com 2012855Sgabeblack@google.com/***************************************************************************** 2112855Sgabeblack@google.com 2212855Sgabeblack@google.com display.h -- 2312855Sgabeblack@google.com 2412855Sgabeblack@google.com Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 2512855Sgabeblack@google.com 2612855Sgabeblack@google.com *****************************************************************************/ 2712855Sgabeblack@google.com 2812855Sgabeblack@google.com/***************************************************************************** 2912855Sgabeblack@google.com 3012855Sgabeblack@google.com MODIFICATION LOG - modifiers, enter your name, affiliation, date and 3112855Sgabeblack@google.com changes you are making here. 3212855Sgabeblack@google.com 3312855Sgabeblack@google.com Name, Affiliation, Date: 3412855Sgabeblack@google.com Description of Modification: 3512855Sgabeblack@google.com 3612855Sgabeblack@google.com *****************************************************************************/ 3712855Sgabeblack@google.com 3812855Sgabeblack@google.com#include "common.h" 3912855Sgabeblack@google.com 4012855Sgabeblack@google.com/****************************************************************/ 4112855Sgabeblack@google.com/** Display to standard out and to logfile "systemc.log" **/ 4212855Sgabeblack@google.com/****************************************************************/ 4312855Sgabeblack@google.com 4412855Sgabeblack@google.comofstream lout ("systemc.log"); // Output log file 4512855Sgabeblack@google.com 4612855Sgabeblack@google.com/******************************************************************************/ 4712855Sgabeblack@google.com/*************************** Output Display Function **********************/ 4812855Sgabeblack@google.com/******************************************************************************/ 4912855Sgabeblack@google.com 5012855Sgabeblack@google.comSC_MODULE( DISPLAY ) 5112855Sgabeblack@google.com{ 5212855Sgabeblack@google.com SC_HAS_PROCESS( DISPLAY ); 5312855Sgabeblack@google.com 5412855Sgabeblack@google.com// INPUTS & OUTPUTS TO DISPLAY 5512855Sgabeblack@google.com 5612855Sgabeblack@google.com const sc_signal<bool>& reset; 5712855Sgabeblack@google.com const sc_signal<bool>& in_ok; 5812855Sgabeblack@google.com const sc_signal<bool>& out_ok; 5912855Sgabeblack@google.com const sc_signal<bool>& instrb; 6012855Sgabeblack@google.com const sc_signal<bool>& outstrb; 6112855Sgabeblack@google.com const signal_bool_vector &a1,&a2,&a3,&a4,&a5,&a6,&a7,&a8; 6212855Sgabeblack@google.com const signal_bool_vector &d1,&d2,&d3,&d4,&d5,&d6,&d7,&d8; 6312855Sgabeblack@google.com 6412855Sgabeblack@google.com// CONSTRUCTOR DEFINITION 6512855Sgabeblack@google.com 6612855Sgabeblack@google.com DISPLAY( sc_module_name NAME, 6712855Sgabeblack@google.com const sc_signal<bool>& RESET, 6812855Sgabeblack@google.com const sc_signal<bool>& IN_OK, 6912855Sgabeblack@google.com const sc_signal<bool>& OUT_OK, 7012855Sgabeblack@google.com const sc_signal<bool>& INSTRB, 7112855Sgabeblack@google.com const sc_signal<bool>& OUTSTRB, 7212855Sgabeblack@google.com const signal_bool_vector& A1, 7312855Sgabeblack@google.com const signal_bool_vector& A2, 7412855Sgabeblack@google.com const signal_bool_vector& A3, 7512855Sgabeblack@google.com const signal_bool_vector& A4, 7612855Sgabeblack@google.com const signal_bool_vector& A5, 7712855Sgabeblack@google.com const signal_bool_vector& A6, 7812855Sgabeblack@google.com const signal_bool_vector& A7, 7912855Sgabeblack@google.com const signal_bool_vector& A8, 8012855Sgabeblack@google.com const signal_bool_vector& D1, 8112855Sgabeblack@google.com const signal_bool_vector& D2, 8212855Sgabeblack@google.com const signal_bool_vector& D3, 8312855Sgabeblack@google.com const signal_bool_vector& D4, 8412855Sgabeblack@google.com const signal_bool_vector& D5, 8512855Sgabeblack@google.com const signal_bool_vector& D6, 8612855Sgabeblack@google.com const signal_bool_vector& D7, 8712855Sgabeblack@google.com const signal_bool_vector& D8 8812855Sgabeblack@google.com ) 8912855Sgabeblack@google.com 9012855Sgabeblack@google.com : 9112855Sgabeblack@google.com reset (RESET), 9212855Sgabeblack@google.com in_ok (IN_OK), 9312855Sgabeblack@google.com out_ok (OUT_OK), 9412855Sgabeblack@google.com instrb (INSTRB), 9512855Sgabeblack@google.com outstrb (OUTSTRB), 9612855Sgabeblack@google.com a1 (A1), a2(A2), a3(A3), a4(A4), 9712855Sgabeblack@google.com a5 (A5), a6(A6), a7(A7), a8(A8), 9812855Sgabeblack@google.com d1 (D1), d2(D2), d3(D3), d4(D4), 9912855Sgabeblack@google.com d5 (D5), d6(D6), d7(D7), d8(D8) 10012855Sgabeblack@google.com 10112855Sgabeblack@google.com { 10212855Sgabeblack@google.com SC_METHOD( entry ); 10312855Sgabeblack@google.com sensitive << reset; 10412855Sgabeblack@google.com sensitive << in_ok; 10512855Sgabeblack@google.com sensitive << out_ok; 10612855Sgabeblack@google.com sensitive << instrb; 10712855Sgabeblack@google.com sensitive << outstrb; 10812855Sgabeblack@google.com sensitive << a1; 10912855Sgabeblack@google.com sensitive << a2; 11012855Sgabeblack@google.com sensitive << a3; 11112855Sgabeblack@google.com sensitive << a4; 11212855Sgabeblack@google.com sensitive << a5; 11312855Sgabeblack@google.com sensitive << a6; 11412855Sgabeblack@google.com sensitive << a7; 11512855Sgabeblack@google.com sensitive << a8; 11612855Sgabeblack@google.com sensitive << d1; 11712855Sgabeblack@google.com sensitive << d2; 11812855Sgabeblack@google.com sensitive << d3; 11912855Sgabeblack@google.com sensitive << d4; 12012855Sgabeblack@google.com sensitive << d5; 12112855Sgabeblack@google.com sensitive << d6; 12212855Sgabeblack@google.com sensitive << d7; 12312855Sgabeblack@google.com sensitive << d8; 12412855Sgabeblack@google.com } 12512855Sgabeblack@google.com 12612855Sgabeblack@google.com /*** Call to Process Functionality ***/ 12712855Sgabeblack@google.com void entry(); 12812855Sgabeblack@google.com 12912855Sgabeblack@google.com}; 13012855Sgabeblack@google.com 13112855Sgabeblack@google.comvoid 13212855Sgabeblack@google.comDISPLAY::entry() 13312855Sgabeblack@google.com{ 13412855Sgabeblack@google.com// DISPLAYS ALL SIGNALS USED TO DEBUG DESIGN 13512855Sgabeblack@google.com 13612855Sgabeblack@google.com lout << " reset = " << reset 13712855Sgabeblack@google.com << " in_ok = " << in_ok 13812855Sgabeblack@google.com << " out_ok = " << out_ok 13912855Sgabeblack@google.com << " instrb = " << instrb 14012855Sgabeblack@google.com << " outstrb = " << outstrb 14112855Sgabeblack@google.com << "\n" 14212855Sgabeblack@google.com << " a1 = " << a1 14312855Sgabeblack@google.com << " a2 = " << a2 14412855Sgabeblack@google.com << " a3 = " << a3 14512855Sgabeblack@google.com << " a4 = " << a4 14612855Sgabeblack@google.com << "\n" 14712855Sgabeblack@google.com << " a5 = " << a5 14812855Sgabeblack@google.com << " a6 = " << a6 14912855Sgabeblack@google.com << " a7 = " << a7 15012855Sgabeblack@google.com << " a8 = " << a8 15112855Sgabeblack@google.com << "\n" 15212855Sgabeblack@google.com << " d1 = " << d1 15312855Sgabeblack@google.com << " d2 = " << d2 15412855Sgabeblack@google.com << " d3 = " << d3 15512855Sgabeblack@google.com << " d4 = " << d4 15612855Sgabeblack@google.com << "\n" 15712855Sgabeblack@google.com << " d5 = " << d5 15812855Sgabeblack@google.com << " d6 = " << d6 15912855Sgabeblack@google.com << " d7 = " << d7 16012855Sgabeblack@google.com << " d8 = " << d8 16112855Sgabeblack@google.com << endl; 16212855Sgabeblack@google.com 16312855Sgabeblack@google.com} 164