SysemC-AMS Hands-On Lab Par 2 Markus Damm, Chrisoph Grimm Compuer Technology Vienna Universiy of Technology, Ausria François Pecheux Laboraoire d Informaique de Paris 6 Universié Pierre & Marie Curie Compuer Technology /12
SysemC-AMS Hands-On Lab Par 2 These are he slides of he 2nd par of he SysemC AMS 1.0 uorial as held a he PATMOS 2010 in Grenoble The uorial is based on a VirualBox Ubunu image. VirualBox is a free virualizaion sofware and can be downloaded from hp://www.virualbox.org/. The uorial image can be downloaded from www.sysemcams.org/download_pamos_uorial/sysemc_ams_tuorial_ PATMOS_Par_2.rar Simply unpack he rar, Run VirualBox, and selec "File->Impor Appliance" o impor he virual Environmen. Compuer Technology 2 /12
Preliminaries Your asks will consis of ediing code already prepared The deails will be oulined wih commens in he code All module code will be conained in he header files (*.h) This is bad syle, bu allows for beer overview of he uorial code ; afer all, his is no C++ uorial. The Makefile doesn ge changes if hey only occurred in he header files. Use he alias makeh (invokes a make clean all ) o build! The edior nedi provides SysemC AMS synax highlighing View vcd race files wih gkwave, abular race files wih gwave Tasks: BASK Modulaor, BASK Demodulaor, Adding noise and couning errors Compuer Technology 3 /12
Binary Ampliude Shif Keying Principle of BASK modulaion: carrier signal daa signal Principle of BASK demodulaion: mixer (muliplicaion) modulaed signal modulaed signal recifier (absolue value) lowpass filer daa signal Compuer Technology 4 /12
TDF BASK Modulaor carrier in 0 1 0 0 1 1 0 bask_mod sin_src Tp:y sec R:x ou 0 1 0 0 1 1 0 carrier bi_src in R:x R:1 R:x mixer ou Baseband frequency Carrier frequency Carrier ampliude P a r a m e e r s Samples per carrier signal period Compuer Technology 5 /12
Seing raes and ime sep per bi, x many sine-okens are needed bask_mod We have f C /f B sine-periods per bi We wan o sample he carrier signal wih s many okens per sine period sin_src Tp:y sec R:x carrier Therefore: x = s f C /f B in R:x R:1 R:x mixer ou The oken-frequency of he carrier signal is s f C Therefore: y = 1/(s f C ) f C : Carrier frequency f B : Baseband frequency s : Samples per carrier signal period Compuer Technology 6 /12
BASK modulaor ask The files for his ask are conained in he folder Tuorial_Par_2/BASK_Modulaor The files o edi are main.cpp, bask_mod.h mixer.h The bask_mod module uses a readymade sin_src module See Tuorial_Par_2/sine_and_lowpass/sin_src.h Noe he parameers i akes Compuer Technology 7 /12
TDF BASK Demodulaor bask_demod in recifier rc_ou lowpass lp_ou sampler ou R:1 R:1 R:1 R:1 R:x R:1 in rc_ou lp_ou ou Sampler jus needs o inspec one oken of hose i can access when is processing() is execued! The rae x is compued he same way as for he modulaor ou of carrier- and baseband frequency and samples per period Recifier & lowpass could also be used wih higher raes Compuer Technology 8 /12
BASK demodulaor ask The new ask builds on he resuls of previous ask Suck in previous ask? Use he sample soluion in he zip file! The password is Bananas The files for his ask are conained in he folder Tuorial_Par_2/BASK_Demodulaor Files o edi: bask_demod.h, recifier.h and sampler.h main.cpp (oplevel) is already prepared The bask_demod module uses a readymade lowpass module See Tuorial_Par_2/sine_and_lowpass/lowpass.h Noe he parameers i akes Compuer Technology 9 /12
BASK demodulaor ask schemaic overview bask_mod sin_src bask_demod bi_src mixer recifier lowpass sampler Compuer Technology 10 /12
Adding noise and couning errors In Tuorial_Par_2/misc is a file noisy_channel.h The module conained here reads a double value and applies aenuaion & Gaussian noise o i before oupu. Pu i beween modulaor & demodulaor, parameerize i such ha some bi errors are inroduced Wrie a module which reads in_bis and ou_bis and makes an error repor Suck in previous ask? Use he sample soluion in he zip file! The password is Manhaan Compuer Technology 11 /12
Adding noise and couning errors schemaic overview bask_mod sin_src bask_demod bi_src mixer noisy_ channel recifier lowpass sampler bi_error_ deecor Compuer Technology 12 /12
The End! We hope you enjoyed he lab! The code for he final soluion is Zelig Homework ;-) : Le wo (or more) BASK ransceivers communicae over one noisy channel using differen carrier frequencies You would have o add addiional inpus o he noisy channel In Tuorial_Par_2/misc is a file bandpass.h which should come in handy o filer he correc frequency range for each ransceiver Compuer Technology 13 /12