datawidth.h revision 12855
12SN/A/*****************************************************************************
21762SN/A
32SN/A  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
42SN/A  more contributor license agreements.  See the NOTICE file distributed
52SN/A  with this work for additional information regarding copyright ownership.
62SN/A  Accellera licenses this file to you under the Apache License, Version 2.0
72SN/A  (the "License"); you may not use this file except in compliance with the
82SN/A  License.  You may obtain a copy of the License at
92SN/A
102SN/A    http://www.apache.org/licenses/LICENSE-2.0
112SN/A
122SN/A  Unless required by applicable law or agreed to in writing, software
132SN/A  distributed under the License is distributed on an "AS IS" BASIS,
142SN/A  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152SN/A  implied.  See the License for the specific language governing
162SN/A  permissions and limitations under the License.
172SN/A
182SN/A *****************************************************************************/
192SN/A
202SN/A/*****************************************************************************
212SN/A
222SN/A  datawidth.h --
232SN/A
242SN/A  Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
252SN/A
262SN/A *****************************************************************************/
272665Ssaidi@eecs.umich.edu
282665Ssaidi@eecs.umich.edu/*****************************************************************************
292665Ssaidi@eecs.umich.edu
302SN/A  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
312SN/A  changes you are making here.
322SN/A
332SN/A      Name, Affiliation, Date:
342SN/A  Description of Modification:
357678Sgblack@eecs.umich.edu
368229Snate@binkert.org *****************************************************************************/
372147SN/A
382147SN/A                /**************************************/
392680Sktlim@umich.edu                /* Interface Filename:	datawidth.h   */
402132SN/A                /**************************************/
412147SN/A
425999Snate@binkert.org#include "common.h"
432147SN/A
442147SN/ASC_MODULE( datawidth )
452147SN/A{
462147SN/A    SC_HAS_PROCESS( datawidth );
472147SN/A
482147SN/A    sc_in_clk clk;
492147SN/A
502147SN/A  // Inputs
5110474Sandreas.hansson@arm.com	const signal_bool_vector6&	in1;
522090SN/A	const signal_bool_vector6&	in2;
532147SN/A	const sc_signal<bool>&		ready;
544695Sgblack@eecs.umich.edu  // Outputs
5510417Sandreas.hansson@arm.com	signal_bool_vector4&		result;
5610417Sandreas.hansson@arm.com  // Parameters
572SN/A	const int 			in1_width;
582SN/A	const int 			in2_width;
592612SN/A	const int 			result_width;
602612SN/A
612612SN/A  // Constructor
622612SN/A  datawidth (sc_module_name 		NAME,
632612SN/A	sc_clock&			TICK,
642612SN/A	const signal_bool_vector6&	IN1,
652612SN/A	const signal_bool_vector6&	IN2,
662612SN/A	const sc_signal<bool>&		READY,
672612SN/A	signal_bool_vector4&		RESULT,
684695Sgblack@eecs.umich.edu	const int			IN1_WIDTH,
6910417Sandreas.hansson@arm.com	const int                       IN2_WIDTH,
7010417Sandreas.hansson@arm.com	const int                       RESULT_WIDTH )
712612SN/A
722612SN/A      :
738545Ssaidi@eecs.umich.edu	in1	(IN1),
748545Ssaidi@eecs.umich.edu	in2	(IN2),
758545Ssaidi@eecs.umich.edu	ready   (READY),
768545Ssaidi@eecs.umich.edu	result	(RESULT),
778545Ssaidi@eecs.umich.edu	in1_width (IN1_WIDTH),
7810417Sandreas.hansson@arm.com	in2_width (IN2_WIDTH),
7910417Sandreas.hansson@arm.com	result_width (RESULT_WIDTH)
808545Ssaidi@eecs.umich.edu
818545Ssaidi@eecs.umich.edu  	{
825004Sgblack@eecs.umich.edu            clk	(TICK);
834183Sgblack@eecs.umich.edu	    SC_CTHREAD( entry, clk.pos() );
844183Sgblack@eecs.umich.edu        }
854183Sgblack@eecs.umich.edu
864183Sgblack@eecs.umich.edu  void entry();
875004Sgblack@eecs.umich.edu};
885004Sgblack@eecs.umich.edu