亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? switch.cpp

?? SystemC片上系統(tǒng)設(shè)計(jì)的源代碼: 書(shū)籍介紹: SystemC是被實(shí)踐證明的優(yōu)秀的系統(tǒng)設(shè)計(jì)描述語(yǔ)言
?? CPP
字號(hào):
/*****************************************************************************

  The following code is derived, directly or indirectly, from the SystemC
  source code Copyright (c) 1996-2002 by all Contributors.
  All Rights reserved.

  The contents of this file are subject to the restrictions and limitations
  set forth in the SystemC Open Source License Version 2.3 (the "License");
  You may not use this file except in compliance with such restrictions and
  limitations. You may obtain instructions on how to receive a copy of the
  License at http://www.systemc.org/. Software distributed by Contributors
  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
  ANY KIND, either express or implied. See the License for the specific
  language governing rights and limitations under the License.

 *****************************************************************************/

/*****************************************************************************

  switch.cpp - This is the implementation file for the asynchronous process
               "switch".

  Original Author: Rashmi Goswami, Synopsys, Inc.

 *****************************************************************************/

/*****************************************************************************

  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
  changes you are making here.

      Name, Affiliation, Date:
  Description of Modification:

 *****************************************************************************/

#include "systemc.h"
#include "pkt.h"
#include "fifo.h"
#include "switch_reg.h"
#include "switch.h"
//#include "display_data.h"
#define SIM_NUM 100000

void mcast_pkt_switch :: entry()
{
  wait();

  // declarations
  switch_reg R0;
  switch_reg R1;
  switch_reg R2;
  switch_reg R3;
  switch_reg temp;

  int sim_count;
  int pkt_count;
  int drop_count;

  fifo q0_in;
  fifo q1_in;
  fifo q2_in;
  fifo q3_in;

  fifo q0_out;
  fifo q1_out;
  fifo q2_out;
  fifo q3_out;
  /*
  display_data d("Disp");
  d.ctrl(this->switch_cntrl);
  d.in1(q0_in.pntr);
  */
  // FILE *result;

  // initialization
  pkt_count = 0;
  drop_count = 0;
  sim_count  = 0;

  q0_in.pntr = 0;
  q1_in.pntr = 0;
  q2_in.pntr = 0;
  q3_in.pntr = 0;

  q0_out.pntr = 0;
  q1_out.pntr = 0;
  q2_out.pntr = 0;
  q3_out.pntr = 0;

  q0_in.full  = false;
  q1_in.full  = false;
  q2_in.full  = false;
  q3_in.full  = false;

  q0_in.empty = true;
  q1_in.empty = true;
  q2_in.empty = true;
  q3_in.empty = true;

  q0_out.full = false;
  q1_out.full = false;
  q2_out.full = false;
  q3_out.full = false;

  q0_out.empty = true;
  q1_out.empty = true;
  q2_out.empty = true;
  q3_out.empty = true;
  
  R0.free = true;
  R1.free = true;
  R2.free = true;
  R3.free = true;

  // result = fopen("result","w");

  cout << endl;
  cout << "-------------------------------------------------------------------------------" << endl;
  cout << endl << "             4x4 Multicast Helix Packet Switch Simulation" << endl;
  cout << "-------------------------------------------------------------------------------" << endl;
  cout << "  This is the simulation of a 4x4 non-blocking multicast helix packet switch.  " << endl; 
  cout << "  The switch uses a self-routing ring of shift registers to transfer cells     " << endl;
  cout << "  from one port to another in a pipelined fashion, resolving output contention " << endl;
  cout << "  and handling multicast switch efficiently." << endl << endl;
 
  cout << "  Press \"Return\" key to start the simulation..." << endl << endl;

  getchar();

  wait();
  // functionality
  while( sim_count++ < SIM_NUM )
    { 
       wait();
       q0_pntr.write(q0_in.pntr);
       q1_pntr.write(q1_in.pntr);
       q2_pntr.write(q2_in.pntr);
	   q3_pntr.write(q3_in.pntr);
	   drop_cnt.write(drop_count);
	   switched_cnt.write(pkt_count-drop_count);
       /////read input packets//////////////////////////////////     
      if (in0.event()) 
       {
	 pkt_count++;
	 if (q0_in.full == true) drop_count++;
         else q0_in.pkt_in(in0.read());
       };  

       if (in1.event()) 
       {
	 pkt_count++;
	 if (q1_in.full == true) drop_count++;
         else q1_in.pkt_in(in1.read());
       };

       if (in2.event()) 
       {
	 pkt_count++;
	 if (q2_in.full == true) drop_count++;
         else q2_in.pkt_in(in2.read());
       };

       if (in3.event()) 
       {
	 pkt_count++;
	 if (q3_in.full == true) drop_count++;
         else q3_in.pkt_in(in3.read());
       };

      /////move the packets from fifo to shift register ring/////
   
      if((!q0_in.empty) && R0.free) 
	{
          R0.val  = q0_in.pkt_out();
	  R0.free = false;
	}

      if((!q1_in.empty) && R1.free) 
	{
          R1.val  = q1_in.pkt_out();
	  R1.free = false;
	}
      if((!q2_in.empty) && R2.free) 
	{
          R2.val  = q2_in.pkt_out();
	  R2.free = false;
	}
      if((!q3_in.empty) && R3.free) 
	{
          R3.val  = q3_in.pkt_out();
	  R3.free = false;
	}

      if((bool)switch_cntrl && switch_cntrl.event())
	{
            /////shift the channel registers /////////////////////////
            temp = R0;
            R0 = R1;
	    R1 = R2;
	    R2 = R3;
	    R3 = temp;

	    /////write the register values to output fifos////////////
	    if ((!R0.free) && (R0.val.dest0) && (!q0_out.full))
	      {
		q0_out.pkt_in(R0.val); 
		R0.val.dest0 = false;
		if (!(R0.val.dest0|R0.val.dest1|R0.val.dest2|R0.val.dest3)) R0.free = true;
	      }

	    if ((!R1.free) && (R1.val.dest1) && (!q1_out.full))
	      {
		q1_out.pkt_in(R1.val);
		R1.val.dest1 = false;
		if (!(R1.val.dest1|R1.val.dest1|R1.val.dest2|R1.val.dest3)) R1.free = true;
	      }
	    if ((!R2.free) && (R2.val.dest2) && (!q2_out.full))
	      {
		q2_out.pkt_in(R2.val);
		R2.val.dest2 = false;
		if (!(R2.val.dest2|R2.val.dest1|R2.val.dest2|R2.val.dest3)) R2.free = true;
	      }
	    if ((!R3.free) && (R3.val.dest3) && (!q3_out.full))
	      {
		q3_out.pkt_in(R3.val);
		R3.val.dest3 = false;
		if (!(R3.val.dest3|R3.val.dest1|R3.val.dest2|R3.val.dest3)) R3.free = true;
	      }

	    /////write the packets out//////////////////////////////////    
	    if (!q0_out.empty) out0.write(q0_out.pkt_out()); 
	    if (!q1_out.empty) out1.write(q1_out.pkt_out());
	    if (!q2_out.empty) out2.write(q2_out.pkt_out());
	    if (!q3_out.empty) out3.write(q3_out.pkt_out());
		
	}
    } 
 // disp.disp();  
  sc_stop();

  cout << endl << endl << "-------------------------------------------------------------------------------" << endl;
  cout << "End of switch operation..." << endl;
  cout << "Total number of packets received: " <<  pkt_count << endl;
  cout << "Total number of packets dropped: " <<  drop_count << endl;
  cout << "Percentage packets dropped:  " <<  drop_count*100/pkt_count << endl;
  cout << "-------------------------------------------------------------------------------" << endl;
  
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕的久久| 成人免费在线观看入口| av电影在线观看完整版一区二区 | 国产精品不卡在线| 91精品国产aⅴ一区二区| 本田岬高潮一区二区三区| 蜜臀精品久久久久久蜜臀 | 久久久久97国产精华液好用吗| 色综合中文字幕国产 | 欧美成人性战久久| 91久久免费观看| 国产超碰在线一区| 美女在线一区二区| 午夜久久久影院| 国产精品原创巨作av| 亚洲成人av电影在线| 国产精品传媒在线| 国产亚洲一二三区| 日韩欧美一级在线播放| 在线观看日产精品| 91免费视频网| a在线欧美一区| 国产iv一区二区三区| 麻豆国产精品一区二区三区| 亚洲另类春色校园小说| 国产精品视频麻豆| 久久久久久久久久久黄色| 精品区一区二区| 欧美一区二区久久| 欧美日韩一区二区三区在线 | 99精品一区二区| 国产**成人网毛片九色| 国产乱子轮精品视频| 免费看日韩精品| 捆绑紧缚一区二区三区视频 | 色婷婷亚洲综合| aaa国产一区| av中文字幕一区| 北条麻妃国产九九精品视频| 顶级嫩模精品视频在线看| 国产美女av一区二区三区| 国产自产2019最新不卡| 紧缚奴在线一区二区三区| 久久超碰97中文字幕| 免费成人深夜小野草| 麻豆一区二区在线| 韩国精品在线观看| 成人免费看片app下载| 成人免费视频网站在线观看| 99麻豆久久久国产精品免费 | 国精产品一区一区三区mba桃花| 精品亚洲免费视频| 国产乱子轮精品视频| 国产宾馆实践打屁股91| a亚洲天堂av| 在线观看日韩电影| 日韩一区国产二区欧美三区| 欧美不卡视频一区| 国产亚洲精品7777| 亚洲色图欧美激情| 亚洲成人精品一区二区| 久久66热偷产精品| 东方aⅴ免费观看久久av| 91丝袜高跟美女视频| 欧美精品亚洲二区| 亚洲精品在线电影| 中文字幕一区二区三区四区 | 麻豆中文一区二区| 成人久久视频在线观看| 欧美又粗又大又爽| 精品久久国产老人久久综合| 国产欧美精品一区二区色综合 | 国产欧美日韩在线| 亚洲欧美日韩国产一区二区三区 | 91久久香蕉国产日韩欧美9色| 欧美精品久久久久久久多人混战 | 婷婷开心激情综合| 国产综合久久久久影院| 97久久精品人人做人人爽50路| 欧美三级在线看| 国产亚洲精久久久久久| 一区二区三区四区国产精品| 久久精品999| 色哟哟在线观看一区二区三区| 日韩欧美卡一卡二| 一区二区三区在线免费| 精品一区二区三区不卡 | 国产电影一区二区三区| 色噜噜狠狠色综合中国| 国产午夜精品福利| 视频一区免费在线观看| 99免费精品在线| 精品国产一区二区三区忘忧草| 亚洲精品写真福利| 东方欧美亚洲色图在线| 制服丝袜日韩国产| 亚洲欧洲国产专区| 国产综合色视频| 91精品免费观看| 亚洲乱码日产精品bd| 国产九色精品成人porny| 欧美日韩精品一区二区三区蜜桃| 国产精品午夜免费| 国内不卡的二区三区中文字幕 | 2023国产精品| 日韩高清不卡一区二区三区| 91国偷自产一区二区三区观看| 精品国产伦一区二区三区观看体验| 一区二区在线观看视频| 粉嫩av一区二区三区粉嫩| 日韩欧美的一区| 男女性色大片免费观看一区二区| 91看片淫黄大片一级在线观看| 国产亚洲一区二区三区在线观看| 欧美a级一区二区| 51久久夜色精品国产麻豆| 亚洲成人免费影院| 欧美性猛交xxxx乱大交退制版| 国产精品萝li| 国产福利精品一区二区| 久久蜜桃一区二区| 国产主播一区二区三区| 久久综合999| 激情都市一区二区| 欧美精品一区二区在线观看| 青青草原综合久久大伊人精品优势| 欧美色图一区二区三区| 一区二区三区视频在线看| 91香蕉视频污在线| 亚洲蜜臀av乱码久久精品蜜桃| 99久久免费视频.com| 国产精品第13页| 91久久国产最好的精华液| 亚洲激情成人在线| 欧美性大战久久久久久久蜜臀| 亚洲人成小说网站色在线 | 色婷婷久久久综合中文字幕| 中文字幕一区二区三区色视频| 粉嫩欧美一区二区三区高清影视| 国产日韩欧美精品一区| 粉嫩aⅴ一区二区三区四区| 日本一区二区三区在线观看| 国产精品66部| 中文字幕一区二区三区视频| 95精品视频在线| 亚洲午夜精品在线| 91精品久久久久久久99蜜桃| 蜜桃av一区二区三区电影| 日韩美女视频在线| 国产成人精品1024| ㊣最新国产の精品bt伙计久久| 91麻豆高清视频| 日韩专区中文字幕一区二区| 日韩午夜激情av| 岛国精品一区二区| 一个色妞综合视频在线观看| 欧美日韩国产在线播放网站| 蜜臀va亚洲va欧美va天堂| 久久在线观看免费| 99re热这里只有精品免费视频| 亚洲小说春色综合另类电影| 欧美一级一区二区| 国产一区二区三区免费看| 亚洲特黄一级片| 欧美电影一区二区三区| 国内成+人亚洲+欧美+综合在线| 国产精品白丝在线| 欧美日韩精品是欧美日韩精品| 久久精品99国产精品| 国产精品久久久久久福利一牛影视 | 日本欧美在线观看| 亚洲国产高清在线观看视频| 在线观看亚洲一区| 美女视频黄免费的久久| 久久精品综合网| 欧美日韩免费视频| 粉嫩13p一区二区三区| 婷婷一区二区三区| 国产精品久久免费看| 3d成人h动漫网站入口| 国产99久久久国产精品潘金| 亚洲成人777| 国产精品亲子伦对白| 91精品免费观看| 91丝袜高跟美女视频| 激情欧美日韩一区二区| 亚洲自拍与偷拍| 国产欧美一区视频| 欧美一区二区三区在线观看| proumb性欧美在线观看| 青青草国产精品亚洲专区无| 亚洲女同一区二区| 国产亚洲综合性久久久影院| 欧美日本一区二区三区四区 | 国产成人精品免费在线| 视频一区在线视频| 亚洲免费av观看| 欧美激情艳妇裸体舞| 欧美成人精品3d动漫h| 欧美性感一区二区三区|