Sunday, May 30, 2010

perl vs python (hash and list/array)











  perl python
  hash array hash array (tuple for constant, and
list for variable)
symbol
(whole, ele)
{},{} (),[] {},[] []/()
(list/tuple), []
declare my %hash =
("foo", 35)

my %last_name = (

       
"fred" => "flintstone",

…)
my @var = (11, 27.1 , "a string");

my @var = qw/ hello my god /
some_dict =
{

       
"fred": "flintstone",

…}
list = ['milk',
1, 'lettuce']
clear %hash = () @var = ()

$#array = -1;
dict={} list = []
retain
the size
my $count = keys %hash; $scalar = @array;

$scalar = scalar @array;
count = len(hash) l=len(L)
add/use
element
$last_name{'wilma'} =
"flintstone";
$array[3] = 5

@list2 = (1, @list1, 5); 
#nesting is not supported

@subarray2 = @array[0,1..3]
some_dict['wilma'] =
"flintstone"
a = (1, 2); b = (3, 4); c = (a, b) => ((1,2),(3,4))

c=a+b => (1,2,3,4)

L[i:j] = J;
use
keys/values
my @k =
keys %hash;

my @v = values %hash;

while ( ($key, $value) = each %hash )

 
  k =
hash.keys()

v = hash.values()

for (key, value) in hash.items():

  ...
 
check
existence of an ele
if (exists $books{'dino'}) exists  $array[
$index ] -> existence

defined $array[ $index ] -> defined
if books.has_key('dino'):  
add an
ele to the end
  push(@coins,
"Penny");
  list.append(x)
add an
ele to the beginning
  shift(@coins,
"First");
  list.insert(0,
x)
remove
an ele
delete $books{$person};    del books[person]  
from the
beginning
  $var=unshift(@coins);   a=list.pop([i])
from the
end
  $var=pop(@coins);   a=list.pop()
sort sort { $a <=> $b }
keys(%hash)
@array2 =
reverse sort (@array);
  sorted([5, 2, 3, 1, 4])

list.sort()

list.reverse()
sort
(unique value)
  my @s = uniq sort @a;    
join/split   $firststring
= join(", ",@array);

@array = split('-',$astring);
   
index       list.index(var)  #find the first ele that match var
ref my
$hash_ref = {};

$href->{ $key } = $value;
    ref_list=true_list





Friday, May 21, 2010

PCIe introduction - part2


2.  
Device Layers


Three categories of packets are defined,
each one is associated with one of the three device layers. Associated with the
Transaction Layer is the Transaction Layer Packet (TLP). Associated with the
Data Link Layer is the Data Link Layer Packet (DLLP). Associated with the
Physical Layer is the Physical Layer Packet (PLP).

2.1  
TLP Packet Assembly



TLP Origin and Destination




TLP Assembly

2.2  
Flow Control



2.3  
Traffic Classes (TCs) and
Virtual Channels (VCs)


TC
is a TLP header field
transmitted within the packet
unmodified end-to-end through the fabric. Local application software and system
software based on performance requirements decides what TC label a TLP uses. VCs are physical buffers that provide a
means to support multiple independent logical data flows over the physical Link
via the use of transmit and receiver virtual channel buffers.

PCI Express devices may implement up to 8
VC buffers (VC0-VC7). The TC field is a 3-bit field that allows differentiation
of traffic into 8 traffic classes (TC0-TC7).

2.4  
Data Link Layer Contribution to
TLPs and DLLPs


The Data Link Layer concatenates a 12-bit
sequence ID and 32-bit LCRC field to an outbound TLP that arrives from the
Transaction Layer. The sequence ID is used to associate a copy of the outbound
TLP stored in the replay buffer with a received ACK/NAK DLLP inbound from a
neighboring remote device. The ACK/NAK DLLP confirms arrival of the outbound
TLP in the remote device.


There are three major types of DLLPs: Ack/Nak, Power Management (several variants), and Flow Control. Each DLLP is 8
bytes
, including a Start Of DLLP (SDP) byte, 2-byte CRC(using all 4 bytes
of the DLLP), and an End Of Packet (END) byte in addition to the 4 byte DLLP
core (which includes the type field and any
required attributes). In addition, the specification defines a vendor-specific
DLLP.

A DLLP DW(double word?) core is a 4 byte packet. The 8-bit DLLP Type field indicates various categories of DLLPs. These
include: ACK, NAK, Power Management related DLLPs (PM_Enter_L1, PM_Enter_L23,
PM_Active_State_Request_L1, PM_Request_Ack) and Flow Control related DLLPs
(InitFC1-P, InitFC1-NP, InitFC1-Cpl, InitFC2-P, InitFC2-NP, InitFC2-Cpl,
UpdateFC-P, UpdateFC-NP, UpdateFC-Cpl). Received DLLPs which fail the CRC check
are discarded. The loss of information from discarding a DLLP is self repairing
such that a successive DLLP will supersede any information lost. ACK and NAK
DLLPs contain a 12-bit(?) sequence ID
field
(shown as Misc. field) used by the device to associate an inbound
ACK/NAK DLLP with a stored copy of a TLP in the replay buffer.

2.5  
Non-Posted Transaction Showing
ACK-NAK Protocol (RD only for NP?)



Requester/Switch will keep its req TLP till
corresponding ACK DLLP is received from Switch/Completer respectively. And
Completer/Switch will keep its CplD TLP till corresponding ACK DLLP is received
from Requester/Switch respectively.

2.6  
Posted Transaction Showing
ACK-NAK Protocol (WR only for Posted?)







PCIe introduction - part1




1.     PCIe Introduction


Short description:packet based,
point-to-point, fast lvds link



1.1     history


The first generation buses include the ISA,
EISA, VESA, and Micro Channel buses, while the second generation buses include
PCI, AGP, and PCI-X. PCI Express is the third generation high performance I/O
bus used to interconnect peripheral devices in applications such as computing
and communication platforms



1.2     Link


A PCI Express interconnect that connects
two devices together is referred to as a Link. A Link consists of either x1,
x2, x4, x8, x12, x16 or x32 signal pairs in each direction. These signals are
referred to as Lanes. PCI Express implements a dual-simplex Link which implies
that data is transmitted and received simultaneously on a transmit and receive
Lane. The aggregate bandwidth assumes simultaneous traffic in both directions. With
PCIe v1.0 2.5 Gbits/sec is defined for each lane, thus the throughput for a x1
link is 0.5GB/sec. This is derived by multiplying 2.5 Gbits/sec by 2 (for each
direction), then multiplying by number of Lanes, and finally divide by 10-bits
per Byte (to account for the 8-to-10 bit encoding).



a PCI Express interconnect consists of point-to-point
Link. x1 Link consists of 1 Lane or 1 differential signal pair in each
direction for a total of 4 signals.

1.3     More details on physical link


No clock signal exists on the Link. PCI
Express encodes transactions using a packet based protocol.

PCI Express supports the same address
spaces as PCI: memory, IO and configuration address spaces. In addition, the
maximum configuration address space per device function is extended from 256
Bytes to 4 KBytes.



1.4     Error Resilient


CRC fields are embedded within each packet
transmitted. One of the CRC fields supports a Link-level error checking
protocol whereby each receiver of a packet checks for Link-level CRC errors.
Packets transmitted over the Link in error are recognized with a CRC error at
the receiver. The transmitter of the packet is notified of the error by the
receiver. The transmitter automatically retries sending the packet (with no
software involvement), hopefully resulting in auto-correction of the error
resistent. In addition, an optional CRC field within a packet allows for
end-to-end data integrity checking required for high availability applications



1.5     Flow Control


A packet transmitted by a device is
received into a VC buffer in the receiver at the opposite end of the Link. The
receiver periodically updates the transmitter with information regarding the amount
of buffer space it has available
. The transmitter device will only transmit
a packet to the receiver if it knows that the receiving device has sufficient
buffer space to hold the next transaction. The protocol by which the
transmitter ensures that the receiving buffer has sufficient space available is
referred to as flow control. The flow control mechanism guarantees that a
transmitted packet will be accepted by the receiver, baring error conditions.
As such, the PCI Express transaction protocol does not require support of
packet retry (unless an error condition is detected in the receiver), thereby
improving the efficiency with which packets are forwarded to a receiver via the
Link



1.6     Interrupt


PCI Express device use a memory write
packet to transmit an interrupt vector to the root complex host bridge device,
which in-turn interrupts the CPU. PCI Express devices are required to implement
the MSI capability register block. PCI Express also supports legacy interrupt
handling in-band.



1.7     Topology


Major components in the PCI Express system
include a root complex, switches, and endpoint devices.




Monday, May 17, 2010

verilog/sv indent


  1 #!/usr/bin/perl

  2 # Author; Lifeng Chen, Magnum Semiconductor

  3 # Purpose: Indent verilog/systemverilog file

  4

  5 use Term::ANSIColor;

  6

  7 # Flow Control

  8 my $debug_me = 1;

  9

 10 ##TODO

 11 # 1. better indent for block-comment

 12

 13 # Space for each indent

 14 my $Space = "  ";

 15

 16 # comment definition.

 17 my $sl_delm = qw(// );

 18 my %block_delm = (

 19   '{' => '}',

 20   '(' => ')'

 21 );

 22

 23 # Note: Each Open keyword must have corresponding close keyword

 24 my @OpenSingle = qw{repeat for while if else};

 25 my @CloseSingle = qw{; };

 26

 27 my @OpenKeywords = qw{ begin module program package class task function fork case casex casez};  #interface

 28 my @CloseKeywords = qw{ end endmodule endprogram endpackage endclass endtask endfunction join join_none join_any endcase};  #endinterface

 29 my @IgnoreKeywords = qw{ extern typedef disable};

 30

 31 my @OpenSpecial = qw{ovm_field_utils_begin ovm_object_utils_begin ovm_object_param_utils_begin ovm_component_utils_begin};

 32 my @CloseSpecial = qw{ovm_field_utils_end ovm_object_utils_end ovm_object_param_utils_end ovm_component_utils_end};

 33

 34 @OpenKeywords = (@OpenKeywords, @OpenSpecial);

 35 @CloseKeywords = (@CloseKeywords, @CloseSpecial);

 36

 37 sub indent {

 38     my $open_block_comment=0, $close_block_comment=0, $in_block_comment=0;

 39     my $total_indent = 0, $block_indent = 0, $single_indent = 0, $last_indent=0;

 40     my($infile) = @_;

 41     my $tmpfile= "$infile.tmp";

 42     my $open_num=0, $close_num=0, $bracket_delta=0;

 43     my $cleaned_line;

 44

 45     print colored ['green'],"$infile\n";

 46     system("cp $infile $tmpfile");

 47

 48     open(TFILE, ">$tmpfile");

 49     open(FILE, "<$infile");

 50

 51     LINE_LOOP: while(my $line = <FILE>) {

 52         chomp $line;

 53         if ($open_block_comment==1 and $close_block_comment==0) {$in_block_comment = 1;}

 54         else {$in_block_comment = 0;}

 55         $line =~ s{$sl_delm(\w|\*)}{$sl_delm $1};  #remove false block-comment; append space after single-line comment symbol immediately followed by letters etc

 56         $cleaned_line=$line;

 57

 58         if ($cleaned_line =~ m{/\*}) {

 59             $open_block_comment=1;  #start a block comment

 60         }

 61         if ($cleaned_line =~ m{\*/}) {

 62             $close_block_comment=1; #end a block comment

 63         }

 64         if ($close_block_comment == 1) {  #clear block comment flag

 65             $open_block_comment=0;

 66             $close_block_comment=0;

 67         }

 68         #if ($in_block_comment) {$cleaned_line =~ s{^.*\*/}{*/};}  #remove anything in block comment, till end-block symbol is detected

 69         $cleaned_line=~s{"[^"]*"}{}g;  #remove keyword in string

 70         $cleaned_line =~ s{/\*.*\*/}{}g;  #remove keyword in a single-line block comment

 71         $cleaned_line =~ s{^.*\*/}{};  #remove keyword in block comment

 72         $cleaned_line =~ s{/\*.*$}{};  #remove keyword in block comment

 73         $cleaned_line=~ s{$sl_delm.*$}{};  #remove keyword in line comment

 74         $cleaned_line =~ s{\s+$}{};  #remove tailing blanks

 75         #if ($debug_me == 1 and $. >= 577 and $. <= 585) {

 76         #print "debug_me: $., blk_ind: $block_indent, sgl_ind: $single_indent, comment=$in_block_comment: '$cleaned_line'\n";

 77         #}

 78         if ($in_block_comment==1) {

 79             print TFILE "$line\n";  #keep things as they were in a block comment

 80             next LINE_LOOP;

 81         }

 82         $line =~ s/^\s+//;  #remove leading space to prepare for indent

 83         $line =~ s/\s+$//;  #remove any tailing space

 84

 85         #output the active line

 86         if ($line =~ m{^$sl_delm}) {  #indent single-line comment

 87             for($i=0;$i<$block_indent+$single_indent;$i++) { print TFILE $Space; }

 88             print TFILE "$line\n";

 89             next LINE_LOOP;

 90         }

 91

 92         foreach $CloseKey (@CloseKeywords) {

 93             if($cleaned_line =~ /\b$CloseKey\b/) { $block_indent--; $single_indent=0;}

 94         }

 95         $bracket_delta=0;

 96         foreach $open (keys %block_delm) { #indent brackets

 97           $close=$block_delm{"$open"};

 98           $open_num = ($cleaned_line =~ s/\Q$open\E/$open/isg);

 99           $close_num = ($cleaned_line =~ s/\Q$close\E/$close/isg);

100           $bracket_delta+=$open_num-$close_num;

101         }

102         if ($cleaned_line =~ /\S/) {for($i=0;$i<$block_indent+$single_indent;$i++) { print TFILE $Space; }}  #don't indent empty line

103         print TFILE "$line\n";

104         $start_block_line=0;

105         OPEN_BLOCK: foreach $OpenKey (@OpenKeywords) {

106             foreach $IgnoreKey (@IgnoreKeywords) {

107               if($cleaned_line =~ /\b$IgnoreKey\b/) { last OPEN_BLOCK;}

108             }

109             if($cleaned_line =~ /\b$OpenKey\b/) { $block_indent++; $start_block_line=1; }

110         }

111         if ($start_block_line == 0) {

112             OPEN_SINGLE: foreach $OpenKey (@OpenSingle) {

113                 if($cleaned_line =~ /\b$OpenKey\b/ and $cleaned_line !~ /`$OpenKey\b/ ) {

114                     $single_indent++;

115                 }

116             }

117             if ($single_indent > 0) {

118                 CLOSE_SINGLE: foreach $CloseKey (@CloseSingle) {

119                     if($cleaned_line =~ /$CloseKey$/) {

120                         $single_indent=0;

121                     }

122                 }

123             }

124         }

125         $block_indent+=$bracket_delta;

126         #if ($bracket_delta<0) {$block_indent+=$bracket_delta; }

127         #if ($bracket_delta>0) {$block_indent+=$bracket_delta; }

128         if ($block_indent < 0) {print colored ['yellow'],"\tindent_num = $block_indent @ cleaned_line $.. will be reset.\n"; $block_indent=0;}

129         $last_indent=$block_indent;

130     }

131     $total_indent=$block_indent + $single_indent;

132     if ($total_indent != 0) {print colored ['yellow'],"\tThe indentation of final line is not cleared to zero: $block_indent + $single_indent\n";}

133     close FILE; close TFILE;

134     system("mv -f $tmpfile $infile");

135 }

136

137 my $argnum;

138 if($ARGV[0] eq "" or $ARGV[0] =~ /-h/) {

139     print "Usage : $0 verilogfile.v\n";

140     print "        $0 *.sv\n";

141     print "        $0 *.*v*\n";

142     print "Help  :\n";

143     print "        $0\n";

144     exit(0);

145 }

146 print "Indenting...\n";

147 foreach $argnum (0 .. $#ARGV) {

148     my $ifile = $ARGV[$argnum];

149     &indent($ifile);

150 }

>

Thursday, May 13, 2010

inkscape usage(shortcut)

b Bessel curve
c Calligraphic
d Dropper
e Eclipse
f
g Gradients
h
i spIral
j
k
l
m
n edit path by Node
o create diagram cOnnector
p Pencil
q Quick look
r Rectangle
S Select
t Text
u fill boUnded area
v
w tWeak objects
x 3d boX
y
z Zoom
[] (ctrl, alt) rotate by 15degree (90 degree/1 pixel)
<> (ctrl, alt) resize by 2 pixel(1 time/1 pixel)
arrow (shift, alt) move by 2 pixel(20 pixel/1 pixel)
arrow (ctrl) move view
click (ctrl) (object in a group)

gradients:
stroke: border color, pattern
filling: solid, gradient

Monday, May 10, 2010

打结



八字结
和单结相同的用途, 拉紧后不像单结一样的夹挤, 所以比较容易解开, 而且体形较单结大些, 更适合做为止索结使用。许多以单结为单元的结, 也可以用八字结代替。因为结形对称, 所以又称完整结 Perfect knot 。(used as easy-to-release knot)

平结
在童军表解中指出, 平结: 联结两绳或捆缚对象时用, 并不详尽。平结通常用于捆扎或包裹对象, 或作为两条有拉力的绳之连接。但是它并不是一个好的接绳结, 如两绳粗细不同时, 平结就容易滑脱, 而且在大拉力下容易夹挤, 不易解开。因为它的结形扁平, 所以最适合用在绑扎绷带, 其它结因为体积较大, 并不似平结舒适。


袋口结
主要用在禁制一物体, 并防止它扩大。它不能使用在平面或角隅上, 但却能用在圆的物体, 如圆木柱、袋口、工具把手....等。

牧童结
本结最大的特点在绳的一端有着良好的强度而另一端则可以轻而易举的将结解开, 因此广泛的被应用在船泊、登山、救生(救火) 及农牧上, 又称为强盗圆角结、马贼结< Highwaymans Hitch or Highwaymans Cutaway or Draw Hitch > 驴结< Don-key Hitch >。(my second favorite)

活索结
又称为码头索 适合将船头绳或具有拉力的绳索暂时系在桩上或柱上。松解时,仅须将未受拉力的一端轻轻一拉,整个结便滑脱。
 

称人结
是最通常在一绳端打成一固定圈的结法,具有极高的破断强度,而且不会滑脱和夹挤,是一个安全可靠的结。又称布林结(single bowling)、织布结、共同结、套结。(my favorite)









结绳绳结

DVB related

excerpted from http://en.wikipedia.org/wiki/Digital_Video_Broadcasting etc.

DVB
Digital Video Broadcasting (DVB) is a suite of internationally accepted open standards for digital television. DVB standards are maintained by the DVB Project, an international industry consortium with more than 270 members, and they are published by a Joint Technical Committee (JTC) of European Telecommunications Standards Institute (ETSI), European Committee for Electrotechnical Standardization (CENELEC) and European Broadcasting Union (EBU). The interaction of the DVB sub-standards is described in the DVB Cookbook.[1] Many aspects of DVB are patented, including elements of the MPEG video coding and audio coding.

DVB systems distribute data using a variety of approaches, including by satellite (DVB-S, DVB-S2 and DVB-SH; also DVB-SMATV for distribution via SMATV); cable (DVB-C, DVB-C2); terrestrial television (DVB-T, DVB-T2) and digital terrestrial television for handhelds (DVB-H, DVB-SH); and via microwave using DTT (DVB-MT), the MMDS (DVB-MC), and/or MVDS standards (DVB-MS)

These standards define the physical layer and data link layer of the distribution system. Devices interact with the physical layer via a synchronous parallel interface (SPI), synchronous serial interface (SSI), or asynchronous serial interface (ASI). All data is transmitted in MPEG transport streams with some additional constraints (DVB-MPEG). A standard for temporally-compressed distribution to mobile devices (DVB-H) was published in November 2004.

The conditional access system (DVB-CA) defines a Common Scrambling Algorithm (DVB-CSA) and a physical Common Interface (DVB-CI) for accessing scrambled content. DVB-CA providers develop their wholly proprietary conditional access systems with reference to these specifications. Multiple simultaneous CA systems can be assigned to a scrambled DVB program stream providing operational and commercial flexibility for the service provider.

ASI
ASI is streaming data format which often carries an MPEG Transport Stream (MPEG-TS).
DVB-ASI interface has become popular for use with infrastructure equipment. DVB-ASI is a fixed-frequency serial interface with a clock rate of 270 Mbps that transmits MPEG-2 data in PA fashion. The physical layer is based upon a subset of fiber channel levels (FC-0 and FC-1), and makes use of the 8B/10B channel coding of that standard.
An ASI signal can carry one or multiple SD, HD or audio programs that are already compressed, not like an uncompressed SDI.
An ASI signal can be at varying transmission speeds and is completely dependent on the user's setup requirements. Generally, the ASI signal is the final product of video compression, either MPEG2 or MPEG4.
DVB-ASI interfaces must support 188-byte MPEG packets and optionally may support 204-byte packets with either 16 Reed-Solomon (RS) error correction bytes or 16 dummy bytes.

SDI
Serial digital interface (SDI) is a serial link standardized by ITU-R BT.656 and the Society of Motion Picture and Television Engineers (SMPTE). SDI transmits uncompressed digital video over 75-ohm coaxial cable within studios, and is seen on most professional video infrastructure equipment.

Data is encoded in NRZI format, and a linear feedback shift register(LFSR) is used to scramble the data to reduce the likelihood that long strings of zeroes or ones will be present on the interface. The interface is self-synchronizing and self-clocking. Framing is done by detection of a special synchronization pattern, which appears on the (unscrambled) serial digital signal to be a sequence of ten ones followed by twenty zeroes (twenty ones followed by forty zeroes in HD); this bit pattern is not legal anywhere else within the data payload.

The first revision of the standard, SMPTE 259M, was defined to carry digital representation of analog video such as NTSC and PAL over a serial interface and is more popularly known as standard-definition (SD) SDI. The data rate required to transmit SD SDI is 270 Mbps.

With the advent of high-definition (HD) video standards such as 1080i and 720p, the interface was scaled to handle higher data rates of 1.485 Gbps. The 1.485-Gbps serial interface is commonly called the HD SDI interface and is defined by SMPTE 292M, using the same 75-ohm coaxial cable.

Studios and other video production facilities have invested heavily on the hardware infrastructure for coaxial cable and have a vested interest in extending the life of their infrastructure. Fortunately, SMPTE recently ratified a new standard called SMPTE 424M that doubles the SDI data rates to 2.97 Gbps using the same 75-ohm coaxial cable. This new standard, also called 3-Gbps (3G)-SDI, enables higher resolution of picture quality required for 1080p and digital cinema. This interface supports 4:4:4 at 2K resolution on ONE BNC.

Tuesday, May 4, 2010

psalm

A Psalm of David
1 The LORD is my shepherd; I shall not want.
2 He maketh me to lie down in green pastures: he leadeth me beside the still waters.
3 He restoreth my soul: he leadeth me in the paths of righteousness for his name's sake.
4 Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.
5 Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over.
6 Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of the LORD for ever. (Psalms 23:1-6)


<灵魂的牧者>

耶和华是我的牧者
我必不至缺乏
他使我躺卧在青草地上
领我在可安歇的水边
他使我的灵魂苏醒
为自己的名引导我走义路
我虽然行过死荫的幽谷
也不怕遭害
因为你与我同在
你的杖 你的竿
都安慰我
在我敌人面前
你为我摆设筵席
你用油膏了我的头
使我的福杯满溢
我一生一世必有
恩惠慈爱随着我
我且要住在耶和华的殿中
直到永远

Monday, May 3, 2010

电视原理2

excerpted from http://courseware.ecnudec.com/zsb/zjx/zjx09/zjx093/zjx09307/zjx093070.HTM et al.
射频电视信号的形成及频道的划分
0.调制基本知识
在模拟调制过程中已调波的频谱中除了载波分量外在载波频率两旁还各有一个频带,因调制而产生的各频率分量就落在这两个频带之内。这两个频带统称为边频带或边带。位于比载波频率高的一侧的边频带,称为上边带。位于比载波频率低的一侧的边频带,称为下边带。在单边带通信中可用滤波法、相移法或相移滤波法取得调幅波中一个边带,这种调制方法称为单边带调制(SSB)。单边带调制常用于有线载波电话和短波无线电多路通信。在同步通信中可用平衡调制器实现抑制载波的双边带调制(DSB-SC)。在数字通信中为了提高频带利用率而采用残留边带调制(VSB),即传输一个边带(在邻近载波的部分也受到一些衰减)和另一个边带的残留部分。在解调时可以互相补偿而得到完整的基带。
1.地面广播电视系统射频全电视信号的形成
使用频段。视频图像电视信号具有6MHz的带宽,因此,地面广播电视系统使用的频段应选在超短波范围,米波和分米波。我国规定广播电视系统选用的频段:
在地面广播电视系统中,图像信号的调制采用残留边带(VSB)调幅,伴音信号采用调频方式,由于图像与伴音的调制方式不同而不致于互相干扰,接收到的伴音信号的质量也较高。
在地面广播电视系统中,图像信号的残留边带调幅就是发送一个完整的上边带和一小部分下边带,抑制大部分另一下边带。(0.75~1.25MHz保留)我国标准规定,伴音载频fS比图像载频fP高6.5MHz,距fP为-1.25MHz处的最小衰减量为20 dB。
残留边带方式的优点:已调信号的频带较窄;滤波器比单边带(SSB)滤波器易实现;易解调(峰值包络检波器即可)。
电视广播中伴音信号的频率范围在50Hz到15kHz之间。为了提高伴音信号的接收质量,送往伴音发射机的伴音信号经过调频(FM)后变成宽带信号。我国规定伴音己调信号的最大频偏为50kHz(调频广播为75kHz),所以已调伴音信号的带宽B为
B=2(Δfm+fm)=2(50+15)=130kHz。

射频全电视信号的频谱及频道划分
视频图像信号和伴音信号分别对图像载频和伴音载频进行VSB调幅和调频后形成射频全电视信号,其频谱如图3-20所示,图中fp是图像载波,fs是伴音载波。其总频带宽度(频道带宽)为8MMz。
以8MHz为间隔,我国电视频道在VHF和UHF频段共分为68个频道,见表3-1。其中,频率为92~167MHz、566~606MHz的部分供调频广播和无线电通信使用(调频广播使用88~108 MHz,其中88~92 MHz频带内可以安排电视频道)。在开路电视系统中不安排电视频道,但在有线电视中常设置有增补频道以增加频道数量。

2. 卫星广播电视射频全电视信号的形成
卫星电视是指用通信广播卫星转发器传送电视信号,供覆盖区内的广大用户接收观看,它包含卫星电视信号的取得、存储、传输、接收再现的全过程。卫星电视覆盖范围大,信号传输质量高,传输频带宽,容量大,费用省,效益高,无距离限制等特点。
卫星广播电视系统都使用微波频段。
·微波频段带宽很宽,具有丰富的频率资源,可容纳更多的频道,且允许每个频道占用较宽的带宽;
·微波频段频率高、波长短,可使星上和地面的天线尺寸大大减小,增益提高,方向性增强,从而减小卫星的体积相重量,降低对发射功率的要求,且可防止对邻近区域约干扰;
·微波频段不易受大气扰动噪声的影响;
·微波能穿过电离层;
·无线电业务已占用较低频率,而微波频段相对比较“空闲”。

根据国际电信联盟ITU的有关规定,卫星广播下行频段有六个,目前使用较多的为C波段(下行频率3.7G~4.2G)和Ku波段(下行频率11.7~12.2G)。由于波段资源有限,卫星广播下行电波均采用不同的极化方式,达到频率复用的目的。


电视发射天线
电视发射天线,根据频段的不同,主要分为VHF天线和UHF天线两大类。
在VHF频段,蝙蝠翼天线是一种被广泛采用的天线,可以较好地满足对电视发射天线的要求。蝙蝠翼天线属于旋转场型天线。
在实际中,常常使用多层蝙蝠翼天线。多层蝙蝠翼天线在水平面内的方向图与单层的基本相同,近似为一个圆。在垂直方向上,方向图与层数有关;层数越多,垂直方向性越尖锐,增益提高,远区场增加。
在UHF频段,广泛采用的发射天线是带反射板的四偶极子天线及其改进型双环天线,它们具有增益高、频带宽等特点,但造价较高。

电视信号属于超短波段,频率高,波长短,传播方式主要为空间波传播,沿直线方向传播到直接可见的地方,即视距传播。
电视信号经地面或遇到障碍物(如大建筑物等)会产生反射,直射信号和反射信号在接收天线上相互干扰,形成多径传播。多径传播的结果表现为重影(右重影)。

电视差转是电视差频转播的简称,电视差转的主要功能是将接收到的主台(或称骨干台)某频道的电视节目,经过差转机的频率变换、放大后,再用另一频道发射出去,从而扩大主台的覆盖范围或服务面积。

卫星广播电视信号的接收
接收天线一股都采用抛物面天线。抛物面天线的增益高、方向性强,在抛物面焦点上接收的信号最强;。它通常用整体成型铝合金材料制成。对于C波段,天线直径要求不小于1.3m。
室外单元主要是一个高频头。为减小噪声,高频头应尽量靠近天线馈源,且与之直接相连;为降低传输损耗,一般采用降频传送方式,即把微波信号降为中频信号,再用电缆传输。因此,室外单元一般由高频低噪声放大器、下变频器(含本振)和中放(或前置中放)组成。
室内单元是卫星电视接收机的控制中心和信号处理设备。其主要作用是从室外单元送来的信号中选取所需要的某频道信号,并将其解调成图像信号和伴音信号送至监视器;或者再把图像信号和伴音信号调制到地面电视广播的某频道上,送至普通电视接收机。此外,室内单元还向室外单元馈送直流电压和控制电压。
根据室内单元是否有变频器,把卫星电视接收机分为一次变频型和两次变频型。一次变频只能接收一个频道。二次变频保持室外单元的本振不变,改变第二本振即可实现频道选择,且一个室外单元可给多个室内单元提供信号。同时,为实现自动频率控制和抑制镜频干扰带来了方便。因此目前大多采用二次变频。