datawidth.h revision 12855:588919e0e4aa
15860Snate@binkert.org/***************************************************************************** 25860Snate@binkert.org 35860Snate@binkert.org Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 45860Snate@binkert.org more contributor license agreements. See the NOTICE file distributed 55860Snate@binkert.org with this work for additional information regarding copyright ownership. 65860Snate@binkert.org Accellera licenses this file to you under the Apache License, Version 2.0 75860Snate@binkert.org (the "License"); you may not use this file except in compliance with the 85860Snate@binkert.org License. You may obtain a copy of the License at 95860Snate@binkert.org 105860Snate@binkert.org http://www.apache.org/licenses/LICENSE-2.0 115860Snate@binkert.org 125860Snate@binkert.org Unless required by applicable law or agreed to in writing, software 135860Snate@binkert.org distributed under the License is distributed on an "AS IS" BASIS, 145860Snate@binkert.org WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 155860Snate@binkert.org implied. See the License for the specific language governing 165860Snate@binkert.org permissions and limitations under the License. 175860Snate@binkert.org 185860Snate@binkert.org *****************************************************************************/ 195860Snate@binkert.org 205860Snate@binkert.org/***************************************************************************** 215860Snate@binkert.org 225860Snate@binkert.org datawidth.h -- 235860Snate@binkert.org 245860Snate@binkert.org Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 255860Snate@binkert.org 265860Snate@binkert.org *****************************************************************************/ 275860Snate@binkert.org 285860Snate@binkert.org/***************************************************************************** 2912563Sgabeblack@google.com 3012563Sgabeblack@google.com MODIFICATION LOG - modifiers, enter your name, affiliation, date and 3113673Sandreas.sandberg@arm.com changes you are making here. 328269Snate@binkert.org 3311802Sandreas.sandberg@arm.com Name, Affiliation, Date: 3411802Sandreas.sandberg@arm.com Description of Modification: 3511802Sandreas.sandberg@arm.com 368269Snate@binkert.org *****************************************************************************/ 378232Snate@binkert.org 388232Snate@binkert.org /**************************************/ 3912563Sgabeblack@google.com /* Interface Filename: datawidth.h */ 408269Snate@binkert.org /**************************************/ 418269Snate@binkert.org 428269Snate@binkert.org#include "common.h" 438269Snate@binkert.org 448269Snate@binkert.orgSC_MODULE( datawidth ) 458269Snate@binkert.org{ 4612563Sgabeblack@google.com SC_HAS_PROCESS( datawidth ); 4712563Sgabeblack@google.com 4812563Sgabeblack@google.com sc_in_clk clk; 498269Snate@binkert.org 508269Snate@binkert.org // Inputs 518232Snate@binkert.org const signal_bool_vector4& in1; 528269Snate@binkert.org const signal_bool_vector6& in2; 538269Snate@binkert.org const sc_signal<bool>& ready; 548269Snate@binkert.org // Outputs 5512563Sgabeblack@google.com signal_bool_vector9& result; 568269Snate@binkert.org // Parameters 5712563Sgabeblack@google.com const int in1_width; 588232Snate@binkert.org const int in2_width; 5913673Sandreas.sandberg@arm.com const int result_width; 608232Snate@binkert.org 618232Snate@binkert.org // Constructor 628232Snate@binkert.org datawidth (sc_module_name NAME, 638232Snate@binkert.org sc_clock& TICK, 648232Snate@binkert.org const signal_bool_vector4& IN1, 6511802Sandreas.sandberg@arm.com const signal_bool_vector6& IN2, 668232Snate@binkert.org const sc_signal<bool>& READY, 678232Snate@binkert.org signal_bool_vector9& RESULT, 688232Snate@binkert.org const int IN1_WIDTH, 698232Snate@binkert.org const int IN2_WIDTH, 7012008Sandreas.sandberg@arm.com const int RESULT_WIDTH ) 7112008Sandreas.sandberg@arm.com 728232Snate@binkert.org : 738232Snate@binkert.org in1 (IN1), 748232Snate@binkert.org in2 (IN2), 758232Snate@binkert.org ready (READY), 768232Snate@binkert.org result (RESULT), 778232Snate@binkert.org in1_width (IN1_WIDTH), 788232Snate@binkert.org in2_width (IN2_WIDTH), 798232Snate@binkert.org result_width (RESULT_WIDTH) 808232Snate@binkert.org 818232Snate@binkert.org { 8213673Sandreas.sandberg@arm.com clk (TICK); 8313673Sandreas.sandberg@arm.com SC_CTHREAD( entry, clk.pos() ); 8413673Sandreas.sandberg@arm.com } 8513673Sandreas.sandberg@arm.com 8613673Sandreas.sandberg@arm.com void entry(); 8713673Sandreas.sandberg@arm.com}; 8813673Sandreas.sandberg@arm.com