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// method_suspends_itself.cpp -- test for 2112855Sgabeblack@google.com// 2212855Sgabeblack@google.com// Original Author: John Aynsley, Doulos, Inc. 2312855Sgabeblack@google.com// 2412855Sgabeblack@google.com// MODIFICATION LOG - modifiers, enter your name, affiliation, date and 2512855Sgabeblack@google.com// 2612855Sgabeblack@google.com// $Log: method_suspends_itself.cpp,v $ 2712855Sgabeblack@google.com// Revision 1.3 2011/05/08 19:18:46 acg 2812855Sgabeblack@google.com// Andy Goodrich: remove extraneous + prefixes from git diff. 2912855Sgabeblack@google.com// 3012855Sgabeblack@google.com 3112855Sgabeblack@google.com// Method process uses suspends, resumes, disables, and enables itself 3212855Sgabeblack@google.com 3312855Sgabeblack@google.com#define SC_INCLUDE_DYNAMIC_PROCESSES 3412855Sgabeblack@google.com 3512855Sgabeblack@google.com#include <systemc> 3612855Sgabeblack@google.com 3712855Sgabeblack@google.comusing namespace sc_core; 3812855Sgabeblack@google.comusing std::cout; 3912855Sgabeblack@google.comusing std::endl; 4012855Sgabeblack@google.com 4112855Sgabeblack@google.comstruct Top: sc_module 4212855Sgabeblack@google.com{ 4312855Sgabeblack@google.com Top(sc_module_name _name) 4412855Sgabeblack@google.com { 4512855Sgabeblack@google.com SC_THREAD(ticker); 4612855Sgabeblack@google.com SC_THREAD(calling); 4712855Sgabeblack@google.com 4812855Sgabeblack@google.com SC_METHOD(target); 4912855Sgabeblack@google.com sensitive << ev; 5012855Sgabeblack@google.com dont_initialize(); 5112855Sgabeblack@google.com t = sc_get_current_process_handle(); 5212855Sgabeblack@google.com 5312855Sgabeblack@google.com suspend_target = false; 5412855Sgabeblack@google.com resume_target = false; 5512855Sgabeblack@google.com disable_target = false; 5612855Sgabeblack@google.com enable_target = false; 5712855Sgabeblack@google.com dynamic_sensitivity = false; 5812855Sgabeblack@google.com f0 = f1 = f2 = f3 = f4 = f5 = f6 = f7 = f8 = f9 = 0; 5912855Sgabeblack@google.com f10 = f11 = f12 = f13 = f14 = f15 = f16 = f17 = f18 = f19 = 0; 6012855Sgabeblack@google.com f20 = f21 = f22 = f23 = f24 = f25 = f26 = f27 = f28 = f29 = 0; 6112855Sgabeblack@google.com } 6212855Sgabeblack@google.com 6312855Sgabeblack@google.com sc_process_handle t; 6412855Sgabeblack@google.com sc_event ev, ev2; 6512855Sgabeblack@google.com bool suspend_target; 6612855Sgabeblack@google.com bool resume_target; 6712855Sgabeblack@google.com bool disable_target; 6812855Sgabeblack@google.com bool enable_target; 6912855Sgabeblack@google.com bool dynamic_sensitivity; 7012855Sgabeblack@google.com int count; 7112855Sgabeblack@google.com int f0, f1, f2, f3, f4, f5, f6, f7, f8, f9; 7212855Sgabeblack@google.com int f10, f11, f12, f13, f14, f15, f16, f17, f18, f19; 7312855Sgabeblack@google.com int f20, f21, f22, f23, f24, f25, f26, f27, f28, f29; 7412855Sgabeblack@google.com 7512855Sgabeblack@google.com void ticker() 7612855Sgabeblack@google.com { 7712855Sgabeblack@google.com for (;;) 7812855Sgabeblack@google.com { 7912855Sgabeblack@google.com wait(10, SC_NS); 8012855Sgabeblack@google.com ev.notify(); 8112855Sgabeblack@google.com } 8212855Sgabeblack@google.com } 8312855Sgabeblack@google.com 8412855Sgabeblack@google.com void calling() 8512855Sgabeblack@google.com { 8612855Sgabeblack@google.com count = 1; 8712855Sgabeblack@google.com wait(15, SC_NS); 8812855Sgabeblack@google.com // Target runs at 10 NS 8912855Sgabeblack@google.com 9012855Sgabeblack@google.com count = 2; 9112855Sgabeblack@google.com suspend_target = true; 9212855Sgabeblack@google.com wait(10, SC_NS); 9312855Sgabeblack@google.com // Target runs at 20 NS and suspends itself 9412855Sgabeblack@google.com 9512855Sgabeblack@google.com count = 3; 9612855Sgabeblack@google.com suspend_target = false; 9712855Sgabeblack@google.com wait(10, SC_NS); 9812855Sgabeblack@google.com // Target does not run at 30 NS 9912855Sgabeblack@google.com 10012855Sgabeblack@google.com count = 4; 10112855Sgabeblack@google.com t.resume(); 10212855Sgabeblack@google.com // Target runs at 35 NS 10312855Sgabeblack@google.com 10412855Sgabeblack@google.com wait(10, SC_NS); 10512855Sgabeblack@google.com // Target runs at 40 NS 10612855Sgabeblack@google.com 10712855Sgabeblack@google.com count = 6; 10812855Sgabeblack@google.com suspend_target = true; 10912855Sgabeblack@google.com resume_target = true; 11012855Sgabeblack@google.com wait(10, SC_NS); 11112855Sgabeblack@google.com // Target runs at 50 NS 11212855Sgabeblack@google.com 11312855Sgabeblack@google.com count = 7; 11412855Sgabeblack@google.com resume_target = true; 11512855Sgabeblack@google.com wait(10, SC_NS); 11612855Sgabeblack@google.com // Double resume at 60 NS 11712855Sgabeblack@google.com 11812855Sgabeblack@google.com count = 8; 11912855Sgabeblack@google.com suspend_target = true; 12012855Sgabeblack@google.com resume_target = false; 12112855Sgabeblack@google.com wait(10, SC_NS); 12212855Sgabeblack@google.com // Target runs at 70 NS 12312855Sgabeblack@google.com 12412855Sgabeblack@google.com count = 9; 12512855Sgabeblack@google.com wait(10, SC_NS); 12612855Sgabeblack@google.com // Double suspend 12712855Sgabeblack@google.com // Target does not run at 80 NS 12812855Sgabeblack@google.com 12912855Sgabeblack@google.com count = 10; 13012855Sgabeblack@google.com suspend_target = false; 13112855Sgabeblack@google.com resume_target = false; 13212855Sgabeblack@google.com t.resume(); 13312855Sgabeblack@google.com // Target runs at 85 NS 13412855Sgabeblack@google.com 13512855Sgabeblack@google.com wait(10, SC_NS); 13612855Sgabeblack@google.com // Target runs at 90 NS 13712855Sgabeblack@google.com sc_assert( count == 11 ); 13812855Sgabeblack@google.com 13912855Sgabeblack@google.com count = 12; 14012855Sgabeblack@google.com t.suspend(); 14112855Sgabeblack@google.com wait(10, SC_NS); 14212855Sgabeblack@google.com // Target does not run at 100 NS 14312855Sgabeblack@google.com 14412855Sgabeblack@google.com count = 13; 14512855Sgabeblack@google.com t.resume(); 14612855Sgabeblack@google.com // Target runs at 105 NS 14712855Sgabeblack@google.com 14812855Sgabeblack@google.com wait(10, SC_NS); 14912855Sgabeblack@google.com // Target runs at 110 NS 15012855Sgabeblack@google.com sc_assert( count == 14 ); 15112855Sgabeblack@google.com 15212855Sgabeblack@google.com count = 15; 15312855Sgabeblack@google.com t.disable(); 15412855Sgabeblack@google.com wait(10, SC_NS); 15512855Sgabeblack@google.com // Target does not run at 120 NS 15612855Sgabeblack@google.com 15712855Sgabeblack@google.com count = 16; 15812855Sgabeblack@google.com wait(10, SC_NS); 15912855Sgabeblack@google.com // Target does not run at 130 NS 16012855Sgabeblack@google.com 16112855Sgabeblack@google.com count = 17; 16212855Sgabeblack@google.com t.disable(); 16312855Sgabeblack@google.com // Double disable 16412855Sgabeblack@google.com wait(10, SC_NS); 16512855Sgabeblack@google.com // Target does not run at 140 NS 16612855Sgabeblack@google.com 16712855Sgabeblack@google.com count = 18; 16812855Sgabeblack@google.com t.enable(); 16912855Sgabeblack@google.com wait(10, SC_NS); 17012855Sgabeblack@google.com // Target runs at 150 NS 17112855Sgabeblack@google.com 17212855Sgabeblack@google.com count = 19; 17312855Sgabeblack@google.com t.enable(); 17412855Sgabeblack@google.com // Double enable 17512855Sgabeblack@google.com wait(10, SC_NS); 17612855Sgabeblack@google.com // Target runs at 160 NS 17712855Sgabeblack@google.com 17812855Sgabeblack@google.com count = 20; 17912855Sgabeblack@google.com disable_target = true; 18012855Sgabeblack@google.com wait(10, SC_NS); 18112855Sgabeblack@google.com // Target runs at 170 and disables itself 18212855Sgabeblack@google.com 18312855Sgabeblack@google.com count = 21; 18412855Sgabeblack@google.com disable_target = false; 18512855Sgabeblack@google.com wait(10, SC_NS); 18612855Sgabeblack@google.com // Target does not run at 180 18712855Sgabeblack@google.com 18812855Sgabeblack@google.com count = 22; 18912855Sgabeblack@google.com enable_target = true; 19012855Sgabeblack@google.com wait(10, SC_NS); 19112855Sgabeblack@google.com // Target does not run at 190 19212855Sgabeblack@google.com 19312855Sgabeblack@google.com count = 23; 19412855Sgabeblack@google.com wait(10, SC_NS); 19512855Sgabeblack@google.com // Failed to enable it itself, so still does not run at 200 19612855Sgabeblack@google.com 19712855Sgabeblack@google.com count = 24; 19812855Sgabeblack@google.com enable_target = false; 19912855Sgabeblack@google.com t.enable(); 20012855Sgabeblack@google.com wait(10, SC_NS); 20112855Sgabeblack@google.com // Target runs at 210 20212855Sgabeblack@google.com 20312855Sgabeblack@google.com count = 25; 20412855Sgabeblack@google.com disable_target = true; 20512855Sgabeblack@google.com enable_target = true; 20612855Sgabeblack@google.com wait(10, SC_NS); 20712855Sgabeblack@google.com // Target runs at 220 and calls disable -> enable 20812855Sgabeblack@google.com 20912855Sgabeblack@google.com count = 26; 21012855Sgabeblack@google.com disable_target = false; 21112855Sgabeblack@google.com enable_target = false; 21212855Sgabeblack@google.com wait(10, SC_NS); 21312855Sgabeblack@google.com // Target runs at 230 21412855Sgabeblack@google.com 21512855Sgabeblack@google.com count = 27; 21612855Sgabeblack@google.com t.suspend(); 21712855Sgabeblack@google.com wait(10, SC_NS); 21812855Sgabeblack@google.com // Target does not run at 240 21912855Sgabeblack@google.com 22012855Sgabeblack@google.com count = 28; 22112855Sgabeblack@google.com t.enable(); 22212855Sgabeblack@google.com wait(10, SC_NS); 22312855Sgabeblack@google.com // Has no effect - still suspended at 250 22412855Sgabeblack@google.com 22512855Sgabeblack@google.com count = 29; 22612855Sgabeblack@google.com t.disable(); 22712855Sgabeblack@google.com wait(10, SC_NS); 22812855Sgabeblack@google.com // Both disabled and suspended at 260 22912855Sgabeblack@google.com 23012855Sgabeblack@google.com count = 30; 23112855Sgabeblack@google.com t.enable(); 23212855Sgabeblack@google.com wait(10, SC_NS); 23312855Sgabeblack@google.com // Enabled but still suspended 23412855Sgabeblack@google.com 23512855Sgabeblack@google.com count = 31; 23612855Sgabeblack@google.com t.resume(); 23712855Sgabeblack@google.com // Target resumed at 275 NS 23812855Sgabeblack@google.com wait(SC_ZERO_TIME); 23912855Sgabeblack@google.com 24012855Sgabeblack@google.com count = 311; 24112855Sgabeblack@google.com wait(10, SC_NS); 24212855Sgabeblack@google.com 24312855Sgabeblack@google.com count = 32; 24412855Sgabeblack@google.com t.disable(); 24512855Sgabeblack@google.com wait(10, SC_NS); 24612855Sgabeblack@google.com // Disabled at 290 NS 24712855Sgabeblack@google.com 24812855Sgabeblack@google.com count = 33; 24912855Sgabeblack@google.com t.resume(); 25012855Sgabeblack@google.com wait(10, SC_NS); 25112855Sgabeblack@google.com // Still disabled at 300 NS 25212855Sgabeblack@google.com 25312855Sgabeblack@google.com count = 34; 25412855Sgabeblack@google.com t.suspend(); 25512855Sgabeblack@google.com wait(10, SC_NS); 25612855Sgabeblack@google.com // Both disabled and suspended at 310 25712855Sgabeblack@google.com 25812855Sgabeblack@google.com count = 35; 25912855Sgabeblack@google.com t.enable(); 26012855Sgabeblack@google.com wait(10, SC_NS); 26112855Sgabeblack@google.com // Remains suspended at 320 26212855Sgabeblack@google.com 26312855Sgabeblack@google.com count = 36; 26412855Sgabeblack@google.com t.resume(); 26512855Sgabeblack@google.com wait(10, SC_NS); 26612855Sgabeblack@google.com // Resumed at 325 NS and runs at 330 26712855Sgabeblack@google.com sc_assert( count == 37 ); 26812855Sgabeblack@google.com 26912855Sgabeblack@google.com count = 38; 27012855Sgabeblack@google.com suspend_target = true; 27112855Sgabeblack@google.com resume_target = true; 27212855Sgabeblack@google.com disable_target = true; 27312855Sgabeblack@google.com enable_target = true; 27412855Sgabeblack@google.com wait(10, SC_NS); 27512855Sgabeblack@google.com // Runs at 340 27612855Sgabeblack@google.com 27712855Sgabeblack@google.com count = 39; 27812855Sgabeblack@google.com suspend_target = true; 27912855Sgabeblack@google.com resume_target = false; 28012855Sgabeblack@google.com disable_target = true; 28112855Sgabeblack@google.com enable_target = true; 28212855Sgabeblack@google.com wait(10, SC_NS); 28312855Sgabeblack@google.com // Runs at 350, when it suspends 28412855Sgabeblack@google.com 28512855Sgabeblack@google.com count = 40; 28612855Sgabeblack@google.com suspend_target = false; 28712855Sgabeblack@google.com wait(10, SC_NS); 28812855Sgabeblack@google.com // Suspended at 360 28912855Sgabeblack@google.com 29012855Sgabeblack@google.com count = 41; 29112855Sgabeblack@google.com t.resume(); 29212855Sgabeblack@google.com wait(10, SC_NS); 29312855Sgabeblack@google.com // Runs at 365 and 370 29412855Sgabeblack@google.com sc_assert( count == 42 ); 29512855Sgabeblack@google.com 29612855Sgabeblack@google.com sc_assert( t.valid() ); 29712855Sgabeblack@google.com sc_assert( t.terminated() == false ); 29812855Sgabeblack@google.com sc_assert( t.dynamic() == false ); 29912855Sgabeblack@google.com sc_assert( t.get_parent_object() == this ); 30012855Sgabeblack@google.com sc_assert( t.get_process_object() != 0 ); 30112855Sgabeblack@google.com 30212855Sgabeblack@google.com count = 43; 30312855Sgabeblack@google.com t.reset(); 30412855Sgabeblack@google.com wait(SC_ZERO_TIME); 30512855Sgabeblack@google.com 30612855Sgabeblack@google.com count = 44; 30712855Sgabeblack@google.com dynamic_sensitivity = true; 30812855Sgabeblack@google.com wait(10, SC_NS); 30912855Sgabeblack@google.com // Runs at 380 31012855Sgabeblack@google.com 31112855Sgabeblack@google.com count = 45; 31212855Sgabeblack@google.com ev2.notify(); 31312855Sgabeblack@google.com wait(1, SC_NS); 31412855Sgabeblack@google.com 31512855Sgabeblack@google.com count = 46; 31612855Sgabeblack@google.com ev2.notify(); 31712855Sgabeblack@google.com wait(sc_time(400, SC_NS) - sc_time_stamp()); 31812855Sgabeblack@google.com 31912855Sgabeblack@google.com count = 47; 32012855Sgabeblack@google.com dynamic_sensitivity = false; 32112855Sgabeblack@google.com t.sync_reset_on(); // Still dynamically sensitive to ev2 32212855Sgabeblack@google.com ev2.notify(); // Clears dynamic sensitivity, restores static sensitivity 32312855Sgabeblack@google.com 32412855Sgabeblack@google.com count = 48; 32512855Sgabeblack@google.com wait(10, SC_NS); 32612855Sgabeblack@google.com 32712855Sgabeblack@google.com count = 49; 32812855Sgabeblack@google.com t.kill(); 32912855Sgabeblack@google.com 33012855Sgabeblack@google.com if (t.valid()) 33112855Sgabeblack@google.com sc_assert( t.terminated() ); 33212855Sgabeblack@google.com 33312855Sgabeblack@google.com sc_stop(); 33412855Sgabeblack@google.com } 33512855Sgabeblack@google.com 33612855Sgabeblack@google.com void target() 33712855Sgabeblack@google.com { 33812855Sgabeblack@google.com //cout << "Target called at " << sc_time_stamp() << " count = " << count << endl; 33912855Sgabeblack@google.com switch (count) 34012855Sgabeblack@google.com { 34112855Sgabeblack@google.com case 1: sc_assert( sc_time_stamp() == sc_time(10, SC_NS) ); f0=1; break; 34212855Sgabeblack@google.com case 2: sc_assert( sc_time_stamp() == sc_time(20, SC_NS) ); f1=1; break; 34312855Sgabeblack@google.com case 4: sc_assert( sc_time_stamp() == sc_time(35, SC_NS) ); count = 5; f2=1; break; 34412855Sgabeblack@google.com case 5: sc_assert( sc_time_stamp() == sc_time(40, SC_NS) ); f3=1; break; 34512855Sgabeblack@google.com case 6: sc_assert( sc_time_stamp() == sc_time(50, SC_NS) ); f4=1; break; 34612855Sgabeblack@google.com case 7: sc_assert( sc_time_stamp() == sc_time(60, SC_NS) ); f5=1; break; 34712855Sgabeblack@google.com case 8: sc_assert( sc_time_stamp() == sc_time(70, SC_NS) ); f6=1; break; 34812855Sgabeblack@google.com case 10: sc_assert( sc_time_stamp() == sc_time(85, SC_NS) ); count = 11; f7=1; break; 34912855Sgabeblack@google.com case 11: sc_assert( sc_time_stamp() == sc_time(90, SC_NS) ); f8=1; break; 35012855Sgabeblack@google.com case 13: sc_assert( sc_time_stamp() == sc_time(105, SC_NS) ); count = 14; f9=1; break; 35112855Sgabeblack@google.com case 14: sc_assert( sc_time_stamp() == sc_time(110, SC_NS) ); f10=1; break; 35212855Sgabeblack@google.com case 18: sc_assert( sc_time_stamp() == sc_time(150, SC_NS) ); f11=1; break; 35312855Sgabeblack@google.com case 19: sc_assert( sc_time_stamp() == sc_time(160, SC_NS) ); f12=1; break; 35412855Sgabeblack@google.com case 20: sc_assert( sc_time_stamp() == sc_time(170, SC_NS) ); f13=1; break; 35512855Sgabeblack@google.com case 24: sc_assert( sc_time_stamp() == sc_time(210, SC_NS) ); f14=1; break; 35612855Sgabeblack@google.com case 25: sc_assert( sc_time_stamp() == sc_time(220, SC_NS) ); f15=1; break; 35712855Sgabeblack@google.com case 26: sc_assert( sc_time_stamp() == sc_time(230, SC_NS) ); f16=1; break; 35812855Sgabeblack@google.com case 31: sc_assert( sc_time_stamp() == sc_time(275, SC_NS) ); f17=1; break; 35912855Sgabeblack@google.com case 311:sc_assert( sc_time_stamp() == sc_time(280, SC_NS) ); f18=1; break; 36012855Sgabeblack@google.com case 36: sc_assert( sc_time_stamp() == sc_time(325, SC_NS) ); count = 37; f19=1; break; 36112855Sgabeblack@google.com case 37: sc_assert( sc_time_stamp() == sc_time(330, SC_NS) ); f20=1; break; 36212855Sgabeblack@google.com case 38: sc_assert( sc_time_stamp() == sc_time(340, SC_NS) ); f21=1; break; 36312855Sgabeblack@google.com case 39: sc_assert( sc_time_stamp() == sc_time(350, SC_NS) ); f22=1; break; 36412855Sgabeblack@google.com case 41: sc_assert( sc_time_stamp() == sc_time(365, SC_NS) ); count = 42; f23=1; break; 36512855Sgabeblack@google.com case 42: sc_assert( sc_time_stamp() == sc_time(370, SC_NS) ); f24=1; break; 36612855Sgabeblack@google.com case 43: sc_assert( sc_time_stamp() == sc_time(375, SC_NS) ); f29=1; break; //////// 36712855Sgabeblack@google.com case 44: sc_assert( sc_time_stamp() == sc_time(380, SC_NS) ); f25=1; break; 36812855Sgabeblack@google.com case 45: sc_assert( sc_time_stamp() == sc_time(385, SC_NS) ); f26=1; break; 36912855Sgabeblack@google.com case 46: sc_assert( sc_time_stamp() == sc_time(386, SC_NS) ); f27=1; break; 37012855Sgabeblack@google.com case 48: sc_assert( sc_time_stamp() == sc_time(400, SC_NS) ); f28=1; break; 37112855Sgabeblack@google.com default: sc_assert( false ); break; 37212855Sgabeblack@google.com } 37312855Sgabeblack@google.com 37412855Sgabeblack@google.com if (suspend_target) 37512855Sgabeblack@google.com t.suspend(); 37612855Sgabeblack@google.com if (resume_target) 37712855Sgabeblack@google.com t.resume(); 37812855Sgabeblack@google.com if (disable_target) 37912855Sgabeblack@google.com t.disable(); 38012855Sgabeblack@google.com if (enable_target) 38112855Sgabeblack@google.com t.enable(); 38212855Sgabeblack@google.com if (dynamic_sensitivity) 38312855Sgabeblack@google.com next_trigger(ev2); 38412855Sgabeblack@google.com } 38512855Sgabeblack@google.com 38612855Sgabeblack@google.com SC_HAS_PROCESS(Top); 38712855Sgabeblack@google.com}; 38812855Sgabeblack@google.com 38912855Sgabeblack@google.comint sc_main(int argc, char* argv[]) 39012855Sgabeblack@google.com{ 39112855Sgabeblack@google.com Top top("top"); 39212855Sgabeblack@google.com 39312855Sgabeblack@google.com sc_start(); 39412855Sgabeblack@google.com 39512855Sgabeblack@google.com sc_assert( top.f0 ); 39612855Sgabeblack@google.com sc_assert( top.f1 ); 39712855Sgabeblack@google.com sc_assert( top.f2 ); 39812855Sgabeblack@google.com sc_assert( top.f3 ); 39912855Sgabeblack@google.com sc_assert( top.f4 ); 40012855Sgabeblack@google.com sc_assert( top.f5 ); 40112855Sgabeblack@google.com sc_assert( top.f6 ); 40212855Sgabeblack@google.com sc_assert( top.f7 ); 40312855Sgabeblack@google.com sc_assert( top.f8 ); 40412855Sgabeblack@google.com sc_assert( top.f9 ); 40512855Sgabeblack@google.com sc_assert( top.f10 ); 40612855Sgabeblack@google.com sc_assert( top.f11 ); 40712855Sgabeblack@google.com sc_assert( top.f12 ); 40812855Sgabeblack@google.com sc_assert( top.f13 ); 40912855Sgabeblack@google.com sc_assert( top.f14 ); 41012855Sgabeblack@google.com sc_assert( top.f15 ); 41112855Sgabeblack@google.com sc_assert( top.f16 ); 41212855Sgabeblack@google.com sc_assert( top.f17 ); 41312855Sgabeblack@google.com sc_assert( top.f18 ); 41412855Sgabeblack@google.com sc_assert( top.f19 ); 41512855Sgabeblack@google.com sc_assert( top.f20 ); 41612855Sgabeblack@google.com sc_assert( top.f21 ); 41712855Sgabeblack@google.com sc_assert( top.f22 ); 41812855Sgabeblack@google.com sc_assert( top.f23 ); 41912855Sgabeblack@google.com sc_assert( top.f24 ); 42012855Sgabeblack@google.com sc_assert( top.f25 ); 42112855Sgabeblack@google.com sc_assert( top.f26 ); 42212855Sgabeblack@google.com sc_assert( top.f27 ); 42312855Sgabeblack@google.com sc_assert( top.f28 ); 42412855Sgabeblack@google.com sc_assert( top.f29 ); 42512855Sgabeblack@google.com 42612855Sgabeblack@google.com cout << endl << "Success" << endl; 42712855Sgabeblack@google.com return 0; 42812855Sgabeblack@google.com} 42912855Sgabeblack@google.com 430