source: ResearchApps/PHY/MIMO_OFDM/bbReplace.m

Last change on this file was 1729, checked in by murphpo, 12 years ago

Adding Sysgen 13.4 version of coded OFDM PHY; includes temporary fix for crash during simulation (bbReplace.m)

File size: 1.0 KB
Line 
1%Script assumes the OFDM PHY model is open and is the current model
2
3subsys = '/OFDM Rx MIMO/Equalizer & Packetizer/Packet_Constructor';
4fec_dec = find_system([bdroot subsys],  'block_type', 'blackbox2');
5fec_dec_h = get_param(fec_dec, 'Handle'); fec_dec_h = fec_dec_h{1};
6orig_pos = get(fec_dec_h, 'Position');
7orig_init = get(fec_dec_h, 'init_code');
8orig_sim = get(fec_dec_h, 'sim_method');
9
10oldind = str2double(fec_dec{1}(end));
11
12%Adding then deleting will "fix" the problem
13fec_dec_new_h = add_block('xbsIndex_r4/Black Box', [bdroot subsys '/fec_decoder ' num2str(oldind+1)], 'init_code', orig_init);
14set(fec_dec_new_h, 'sim_method', orig_sim');
15delete_block(fec_dec_h);
16
17%Deleting then adding will *not* fix it
18%delete_block(fec_dec_h);
19%fec_dec_new_h = add_block('xbsIndex_r4/Black Box', [bdroot subsys '/fec_decoder 2'], 'init_code', orig_init);
20%set(fec_dec_new_h, 'sim_method', orig_sim');
21
22%Place the new block where the old one was, auto-connecting all ports
23set(fec_dec_new_h, 'position',  orig_pos);
24
25save_system
Note: See TracBrowser for help on using the repository browser.