女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

DS31256的分?jǐn)?shù)級(jí)T1 (FT1)環(huán)回檢測(cè)

星星科技指導(dǎo)員 ? 來源:ADI ? 作者:ADI ? 2023-06-16 15:35 ? 次閱讀

本應(yīng)用筆記介紹了利用DS31256的接收BERT (誤碼率測(cè)試)功能實(shí)現(xiàn)分?jǐn)?shù)級(jí)T1 (FT1)上環(huán)回或下環(huán)回檢測(cè)(V.54)的方法,并給出了示例代碼。

概述

這篇應(yīng)用筆記介紹了利用DS31256的接收BERT功能實(shí)現(xiàn)分?jǐn)?shù)級(jí)T1 (FT1)上環(huán)回或下環(huán)回檢測(cè)(V.54)的方法,詳細(xì)說明請(qǐng)參考分?jǐn)?shù)級(jí)T1.403附錄B規(guī)范。所提供的算法和示例代碼簡(jiǎn)化了DS31256最終用戶的設(shè)計(jì)。

DS31256只有一個(gè)BERT引擎,但有16個(gè)V.54引擎(每端口一個(gè))。因此,當(dāng)測(cè)試端口多于一個(gè)時(shí),軟件帶寬必須能夠處理多路復(fù)用技術(shù)。

算法

圖1圖2所示流程圖詳細(xì)說明了上環(huán)回、下環(huán)回的操作流程。假設(shè)只有端口0查找FT1模板。基本算法設(shè)置BERT查詢上環(huán)回模板。同步后,這個(gè)算法檢測(cè)并確保BERT同步于可編程周期(例程中為0.6秒),然后查找一個(gè)全“1”模板。下環(huán)回例程中采用相同的同步、檢驗(yàn),隨后是全“1”模板。

本例中選擇0.6秒周期確保BERT同步,但這個(gè)時(shí)間周期必須根據(jù)sync_loop函數(shù)運(yùn)行的快慢進(jìn)行調(diào)整。

圖1. FT1 (上環(huán)回與下環(huán)回)檢測(cè)流程

圖1. FT1 (上環(huán)回與下環(huán)回)檢測(cè)流程

圖2. FT1 (上環(huán)回與下環(huán)回)檢測(cè)流程(續(xù))

圖2. FT1 (上環(huán)回與下環(huán)回)檢測(cè)流程(續(xù))

示例代碼中函數(shù)調(diào)用定義

在進(jìn)入特定程序前,必須了解一些假設(shè)條件,程序中需要下列函數(shù)。

  1. write_reg (addr, data)—將特定數(shù)值寫入指定的DS31256寄存器
    addr = DS31256寄存器相對(duì)于芯片基地址的偏移量
    data = 需要寫入寄存器的數(shù)據(jù)
    
  2. read_reg (addr)—讀取DS31256特定地址的寄存器并返回值:
    addr = DS31256寄存器相對(duì)于芯片基地址的偏移量
    
  3. write_ind_reg (addr, data)—將特定數(shù)據(jù)寫入指定的DS31256間接尋址寄存器,然后在返回前等待寄存器的“忙”位被清除:
    addr = 要寫入數(shù)據(jù)的間接尋址寄存器
    data = 寫入指定的間接尋址寄存器的數(shù)據(jù)
    
  4. read_ind_reg (addr, i)—讀取指定地址的DS31256間接尋址寄存器并返回?cái)?shù)值:
    addr = DS31256寄存器相對(duì)于芯片基地址的偏移量
    i = 索引
    
  5. 標(biāo)準(zhǔn)的C語言打印函數(shù)printf

函數(shù)示例代碼

FT1測(cè)試函數(shù)

void FT1Test()
{
	int status = 0;
	
	FT1Setting(0, 0); 				-- Configure the device for BERT
status = sync_loop(1, 300, 5000); 		-- FT1 loop-up test
if(status == 1) 				-- Return status is synced
{
  	status = sync_loop(3, 300, 5000);	-- FT1 all ones test
  	if(status == 1)
  	{
   	loopbackSetup(1);			-- Place channelized in network loopback
	status = sync_loop(2, 300, 5000);	-- FT1 loop-down test
	
	if(status == 1)
   	     {
status = sync_loop(3, 300, 5000); 	-- FT1 all ones test
    		if(status == 1)
loopbackSetup(0);			-- Take out from channelized loopback 
    		else
checkstatus(3);			-- Print out test status
   	} 
	else 
	{
checkstatus(2);			-- Print out test status
	}
  	} 
else 
{
checkstatus(3);			-- Print out test status
  	}
} 
else 
{
  	checkstatus(1);				-- Print out test status
}
}

1. 打印測(cè)試狀態(tài)信息函數(shù)

void checkstatus(int type)
{
	switch(type)
 	{
 	case 1: printf("Loopup pattern not found");	
  		break;
 	case 2: printf("Loopdown pattern not found");
  		break;
 	case 3: printf("All 1's pattern not found");
  		break;
 	}
}

2. 配置FT1函數(shù)

該例程假設(shè)端口0用于FT1檢測(cè)。

void FT1Setting(int dev, int port)
{
int mc = 0;						-- Variables to be used
int ds0 = 0;
int rcfg = 0;
	
mc = read_reg (0x10);				-- Read Master Control(MC) 0x00 register
mc = mc & 0xf07f;	-- Mask out the read-back value from MC 
write_reg (0x10, mc); 	-- Assign the BERT to port 0 (MC.BPS4-0) 

write_reg(0x0304, 0x4000); 	-- Configure port 0 in receive port 
for(ds0 = 0; ds0 < 128; ds0 = ds0 + 1) 		-- Configure register 
{							--Assign timeslot R[0]CFG[ds0].RBERT bit  
write_ind_reg(0x0300, 0x0100 + ds0);	-- Assign all 128 ds0’s to RBERT 
	}				
printf("FT1 configuration completed."); 
}

3. 執(zhí)行FT1測(cè)試函數(shù)

int sync_loop(int pattern, int sync_cnt, int timeout) 
{  
int timeCnt = 0; 					-- Variables will be used
int cnt = 0;
int status = 0;
int temp = 0;
int sync = 0; 
int bertc0 = 0; 
int bertec0 = 0;

BertSetup(pattern);					-- Set up the BERT

bertc0 = read_reg (0x500);				-- Toggle RESYNC
bertc0 = bertc0 | 0x0001;	-- Mask the read BERTC0 value 
write_reg (0x500, bertc0);				-- Write a 1 into BERTC0.RESYNC
bertc0 = bertc0 & 0xfffe;				-- Mask out read-back value
write_reg (0x500, bertc0);				-- Write 0 into BERTC0.RESYNC

bertc0 = read_reg (0x500);				-- Read BERTC0
bertec0 = read_reg (0x518);				-- Read BERTEC0
sync = ((bertec0 & 0x0001) == 0x0001);  		
timeCnt = timeCnt + 1;

while(cnt

4. 在BERT寄存器中建立模板

void BertSetup(int pattern) 
{  
	switch (pattern)  
	{
  	case 1:
write_reg (0x500, 0x0 & 0x003c);	-- Disable BERTC0.RINV 
break;					-- Set 2E7-1 pattern
case 2:
write_reg (0x500, 0x0020 & 0x003c);--Enable BERTC0.RINV 
break;					-- Set 2E7-1 pattern
  	default:
write_reg (0x508, 0xffff);		-- Set BERT Repetitive Pattern Set 
write_reg (0x50C, 0xffff);		-- in BERTBRP0-1
write_reg (0x500, 0x0010 & 0x003c);-- Disable BERTC0.RINV
   		break;					-- Set to repetitive pattern
 	}
}

5. 建立環(huán)回模式函數(shù)

該例程假設(shè)將端口0置于環(huán)回模式。

void loopbackSetup(int val)
{
	int a = 0; 
	int tmp = 0;
	
	tmp = val< 11;
	write_reg(0x0304, tmp); 	-- Set port and channel 0 
 	for (a = 0; a < 128; a++)	-- Set T[0]CFG[a].CNLB to place channel in 
	{	-- loopback  
write_ind_reg(0x0300, 0x0200 + a);		 
	}

	if(val ==1)
	{
write_reg(0x0200, 0x0008); 			-- Enable TP[0]CR.TFDA1 to allow data to 
printf("Loopup detected");			-- be transmitted normally
printf("Channel placed in loopback");	
	}
	else
	{
write_reg(0x0200, 0x0000); 			-- Disable TP[0]CR.TFDA1 bit 
printf("Loopdown detected");
  	printf("Channel taken out from loopback");
	} 
}

結(jié)論

本應(yīng)用筆記介紹了如何使用DS31256的接收BERT功能,從例程和軟件算法可以看出實(shí)施FT1上回環(huán)和下回環(huán)檢測(cè)非常簡(jiǎn)單。

審核編輯:郭婷

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 寄存器
    +關(guān)注

    關(guān)注

    31

    文章

    5421

    瀏覽量

    123319
  • C語言
    +關(guān)注

    關(guān)注

    180

    文章

    7630

    瀏覽量

    140298
  • 代碼
    +關(guān)注

    關(guān)注

    30

    文章

    4886

    瀏覽量

    70252
收藏 人收藏

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    DS31256,pdf,datasheet (256-Cha

    The DS31256 Envoy is a 256-channel HDLC controller that can handle up to 60 T1 or 64 E1 data
    發(fā)表于 04-21 23:49 ?18次下載

    Enabling Fractional-T1(FT1) Lo

    the receive BERT function in the DS31256 to perform Fractional-T1(FT1)loop-up or loop-down detection (V.54). Ov
    發(fā)表于 04-18 11:23 ?1080次閱讀
    Enabling Fractional-<b class='flag-5'>T1</b>(<b class='flag-5'>FT1</b>) Lo

    Examples of DS31256 Applicatio

    OverviewDS31256 has 256 independent directional HDLC channels, which support up to 64 T1 or E1 data streams. Si
    發(fā)表于 04-18 11:25 ?791次閱讀
    Examples of <b class='flag-5'>DS31256</b> Applicatio

    DS31256 HDLC Controller Step-b

    Abstract: This application note provides an example of how to configure a single T1 port on DS31256
    發(fā)表于 04-18 11:29 ?1359次閱讀
    <b class='flag-5'>DS31256</b> HDLC Controller Step-b

    DS31256 HDLC Controller Step-b

    Abstract: This application note provides an example of how to configure a single T1 port on DS31256
    發(fā)表于 04-18 11:30 ?916次閱讀
    <b class='flag-5'>DS31256</b> HDLC Controller Step-b

    DS31256 Loopback Modes

    Abstract: This application note shows how to configure various loopback modes of the DS31256 HDLC
    發(fā)表于 04-18 11:31 ?907次閱讀
    <b class='flag-5'>DS31256</b> Loopback Modes

    DS31256 Gapped Clock Applicati

    Abstract: This application note discusses how to realize gapped clock applications with the DS31256
    發(fā)表于 04-18 11:32 ?1109次閱讀
    <b class='flag-5'>DS31256</b> Gapped Clock Applicati

    DS31256的初始化步驟

    摘要:DS31256 Envoy HDLC控制器在發(fā)送數(shù)據(jù)包之前的初始化順序。 概述按照設(shè)計(jì),DS31256上電以后不會(huì)控制PCI總線。所有的物理端口(端口0至15)發(fā)送全1 (非HDLC空閑碼)
    發(fā)表于 04-20 09:02 ?1092次閱讀

    DS31256 and T1/E1 Interface

    2155, DS21Q55, DS21Q50 and DS26528 in T1/E1, 2MHz, 4MHz, 8MHz clock mo
    發(fā)表于 04-20 09:26 ?1678次閱讀
    <b class='flag-5'>DS31256</b> and <b class='flag-5'>T1</b>/E<b class='flag-5'>1</b> Interface

    DS31256 HDLC控制器的配置步驟—橋接模式

    DS31256 HDLC控制器的配置步驟—橋接模式 本應(yīng)用筆記提供了怎樣配置橋接模式下DS31256 HDLC控制器T1端口的例子。文章提供了一個(gè)實(shí)際例程,以方便最終用戶使用,幫助他
    發(fā)表于 04-21 14:59 ?1621次閱讀
    <b class='flag-5'>DS31256</b> HDLC控制器的配置步驟—橋接模式

    DS31256 上啟用小數(shù) T1 (FT1) 環(huán)檢測(cè)

    發(fā)表于 11-17 12:42 ?0次下載
    在 <b class='flag-5'>DS31256</b> 上啟用小數(shù) <b class='flag-5'>T1</b> (<b class='flag-5'>FT1</b>) <b class='flag-5'>環(huán)</b><b class='flag-5'>回</b><b class='flag-5'>檢測(cè)</b>

    如何利用DS31256 HDLC控制器實(shí)現(xiàn)間隔時(shí)鐘應(yīng)用

    DS31256有16個(gè)物理端口(16 Tx和16 Rx)或鏈路,可配置為信道化或非信道化。通道化端口可以處理一個(gè)、兩個(gè)或四個(gè) T1 或 E1 數(shù)據(jù)鏈路。這些端口或鏈路的時(shí)鐘可以支持間隔時(shí)鐘。本應(yīng)用筆記介紹如何在256通道HDLC
    的頭像 發(fā)表于 01-13 10:25 ?1143次閱讀
    如何利用<b class='flag-5'>DS31256</b> HDLC控制器實(shí)現(xiàn)間隔時(shí)鐘應(yīng)用

    DS31256 接口 - 電信

    電子發(fā)燒友網(wǎng)為你提供Maxim(Maxim)DS31256相關(guān)產(chǎn)品參數(shù)、數(shù)據(jù)手冊(cè),更有DS31256的引腳圖、接線圖、封裝手冊(cè)、中文資料、英文資料,DS31256真值表,DS31256
    發(fā)表于 01-14 19:46
    <b class='flag-5'>DS31256</b> 接口 - 電信

    DS31256閉合時(shí)鐘應(yīng)用

    DS16有16個(gè)物理端口(16 Tx和31256 Rx)或鏈路,可配置為信道化或非信道化。通道化端口可以處理一個(gè)、兩個(gè)或四個(gè) T1 或 E1 數(shù)據(jù)鏈路。這些端口或鏈路的時(shí)鐘可以支持間隔
    的頭像 發(fā)表于 02-13 15:43 ?932次閱讀
    <b class='flag-5'>DS31256</b>閉合時(shí)鐘應(yīng)用

    DS上啟用分?jǐn)?shù)T1環(huán)檢測(cè)

    本應(yīng)用筆記介紹如何使用DS31256的接收BERT功能執(zhí)行分?jǐn)?shù)T1FT1)環(huán)路或環(huán)路下降檢測(cè)(V.54),如
    的頭像 發(fā)表于 02-22 10:08 ?1054次閱讀
    在<b class='flag-5'>DS</b>上啟用<b class='flag-5'>分?jǐn)?shù)</b><b class='flag-5'>T1</b><b class='flag-5'>環(huán)</b><b class='flag-5'>回</b><b class='flag-5'>檢測(cè)</b>