driver.h revision 12855:588919e0e4aa
15882Snate@binkert.org/*****************************************************************************
25882Snate@binkert.org
35882Snate@binkert.org  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
45882Snate@binkert.org  more contributor license agreements.  See the NOTICE file distributed
55882Snate@binkert.org  with this work for additional information regarding copyright ownership.
65882Snate@binkert.org  Accellera licenses this file to you under the Apache License, Version 2.0
75882Snate@binkert.org  (the "License"); you may not use this file except in compliance with the
85882Snate@binkert.org  License.  You may obtain a copy of the License at
95882Snate@binkert.org
105882Snate@binkert.org    http://www.apache.org/licenses/LICENSE-2.0
115882Snate@binkert.org
125882Snate@binkert.org  Unless required by applicable law or agreed to in writing, software
135882Snate@binkert.org  distributed under the License is distributed on an "AS IS" BASIS,
145882Snate@binkert.org  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
155882Snate@binkert.org  implied.  See the License for the specific language governing
165882Snate@binkert.org  permissions and limitations under the License.
175882Snate@binkert.org
185882Snate@binkert.org *****************************************************************************/
195882Snate@binkert.org
205882Snate@binkert.org/*****************************************************************************
215882Snate@binkert.org
225882Snate@binkert.org  driver.h --
235882Snate@binkert.org
245882Snate@binkert.org  Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
255882Snate@binkert.org
265882Snate@binkert.org *****************************************************************************/
275882Snate@binkert.org
285882Snate@binkert.org/*****************************************************************************
295882Snate@binkert.org
305882Snate@binkert.org  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
315882Snate@binkert.org  changes you are making here.
325882Snate@binkert.org
335882Snate@binkert.org      Name, Affiliation, Date:
348232Snate@binkert.org  Description of Modification:
358229Snate@binkert.org
368229Snate@binkert.org *****************************************************************************/
375882Snate@binkert.org
388232Snate@binkert.org/* Filename driver.h */
398232Snate@binkert.org/* This is the interface file for synchronous process `driver' */
408232Snate@binkert.org
418232Snate@binkert.org#include "common.h"
425882Snate@binkert.org
438231Snate@binkert.orgSC_MODULE( driver )
448231Snate@binkert.org{
458232Snate@binkert.org  SC_HAS_PROCESS( driver );
468232Snate@binkert.org
478232Snate@binkert.org  sc_in_clk clk;
488232Snate@binkert.org
498232Snate@binkert.org  const signal_std_logic& in; //input
505882Snate@binkert.org  sc_signal<bool>& control; //output
518231Snate@binkert.org  sc_signal<bool>& out; //output
525882Snate@binkert.org
535882Snate@binkert.org  //Constructor
545882Snate@binkert.org  driver(sc_module_name NAME,
555882Snate@binkert.org	 sc_clock& CLK,
568231Snate@binkert.org	 const signal_std_logic& IN_,
575882Snate@binkert.org	 sc_signal<bool>& CONTROL,
585882Snate@binkert.org	 sc_signal<bool>& OUT_)
598231Snate@binkert.org    : in(IN_), control(CONTROL), out(OUT_)
608232Snate@binkert.org  {
618232Snate@binkert.org    clk(CLK);
628232Snate@binkert.org	SC_CTHREAD( entry, clk.pos() );
638232Snate@binkert.org  }
648232Snate@binkert.org
658232Snate@binkert.org  // Process functionality in member function below
668232Snate@binkert.org  void entry();
678232Snate@binkert.org};
688232Snate@binkert.org
698232Snate@binkert.org
708232Snate@binkert.org