0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

在DS上启用分数T1环回检测

星星科技指导员 来源:ADI 作者:ADI 2023-02-22 10:08 910次阅读

本应用笔记介绍如何使用DS31256的接收BERT功能执行分数T1(FT1)环路或环路下降检测(V.54),如分数T1.403附录B规范中所述。工作算法和编码示例说明了DS31256易于适应终端用户应用。

DS31256只有一个BERT引擎,但有16个V.54引擎(每个端口一个)。因此,如果测试多个端口,软件带宽必须处理所需的多路复用。

算法

下面图 1 和图 2 中的流程图详细描述了环上和下环操作。假定只有端口 0 在查找 FT1 模式。基本算法设置 BERT 以查找环路模式。同步后,算法检查以确保BERT在可编程周期(代码中为0.6秒)内同步,然后查找全一模式。然后,对循环代码遵循相同的同步和检查方法,然后是 all one 模式。

尽管此示例使用 0.6s 作为确保 BERT 同步的时间段,但必须根据 sync_loop 函数的执行速度调整此时间段。

poYBAGP1eSKACaHAAABR_FvcsyQ850.gif

图1.FT1(环上环和环下)探测器操作流程图。

poYBAGP1eSOAezpaAAA5KoVnbL4182.gif

图2.FT1(环上环和环下)检测器操作流程图(续)。

编码示例函数调用的定义

poYBAGP1fUyAG5r3AABsLgLY7Ng470.png

函数的编码示例

测试 FT1 的功能

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. 打印测试状态消息的功能

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的功能

此示例假定端口 0 用于 FT1 检测

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. 执行FT1测试的功能

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= timeout)
   	{
printf("Time Out while searching for pattern.");
return status = 0;
   	}
       }
	delay(2000);
	timeCnt = timeCnt +1;
	bertec0 = read_reg (0x518); 			-- Read value of BERTEC0
	temp = ((bertec0 & 0x0010) == 0x0010);	-- Check BERTEC0.RLOS 
	
	if(temp == 1)
     {
            sync = 0;
   	cnt = 0;
	}
	else
	{
   	cnt = cnt+1;
	}

	if(cnt == sync_cnt)
	{
   	printf("Synced to pattern.");
   	return status = 1;
}
 }
 return 0;
}

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. 设置环回模式的功能

此示例假定端口 0 放置在环回中。

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");
	} 
}

结论

本应用笔记介绍了如何在DS31256中使用接收BERT功能。示例代码和软件算法说明了执行FT1环路或环路检测是多么容易。

审核编辑:郭婷

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 寄存器
    +关注

    关注

    31

    文章

    5394

    浏览量

    122059
  • 端口
    +关注

    关注

    4

    文章

    996

    浏览量

    32428
  • 引擎
    +关注

    关注

    1

    文章

    362

    浏览量

    22711
收藏 人收藏

    相关推荐

    铜绞线原材料紫铜牌号T1T2、T3是什么意思

    铜绞线原材料一般都选用紫铜,因为紫铜导电率、导电导热相比黄铜有更加优越的性能。但是紫铜又有T1T2、T3之分。那么他们之间有什么区别呢?郑州华威金属小编为你做详细解答:紫铜(工业纯
    发表于 11-08 14:56

    T1 ToneMatch音频引擎

    感谢您购买Bose T1 ToneMatch音频引擎。T1 ToneMatch音频引擎向音乐演奏家们提供终极控制。当与Bose L1 II型一起使用T1时,
    发表于 09-03 00:05 37次下载

    DS33R11 以太网映射器,集成了T1/E1/J1收发器

    DS33R11 以太网映射器,集成了T1/E1/J1收发器 DS33R11 概述 DS33
    发表于 10-06 14:51 1332次阅读

    Dallas Semiconductor T1/E1/J1

    摘要:本应用笔记概述了Dallas Semiconductor T1/E1/J1收发器的功能。
    发表于 04-20 08:43 1102次阅读
    Dallas Semiconductor <b class='flag-5'>T1</b>/E<b class='flag-5'>1</b>/J<b class='flag-5'>1</b>收

    DS31256 and T1/E1 Interface

    2155, DS21Q55, DS21Q50 and DS26528 in T1/E1, 2MHz, 4MHz, 8MHz clock mo
    发表于 04-20 09:26 1643次阅读
    <b class='flag-5'>DS</b>31256 and <b class='flag-5'>T1</b>/E<b class='flag-5'>1</b> Interface

    Conversion Between T1 and E1

    Semiconductor DS21X52 and DS21X54 single chip transceivers (SCTs) with the DS216xx clock adapter (CLAD). The
    发表于 04-20 09:47 1110次阅读
    Conversion Between <b class='flag-5'>T1</b> and E<b class='flag-5'>1</b>

    T1/E1 Framer Initialization an

    Semiconductor Framers. IntroductionThis application note shows how to initialize and program Dallas T1/E1 framers. The
    发表于 04-20 10:15 997次阅读

    什么是T1与E1线路

    什么是T1与E1线路 Leased Line 租用线路 租用线路是电信公司为某一机构建造的永久性通信电路。租用线路旁路了本地交换电信局(LEC)
    发表于 03-19 14:10 7505次阅读

    DS26324 E1/T1/J1系统端口短程线路接口单元

    DS26324是支持3.3V供电E1/T1/J1系统的16端口短程线路接口单元(LIU)。通过内部阻抗匹配电路支持各种应用,只需一套少量的外部元件即可支持E
    发表于 03-22 11:39 2422次阅读
    <b class='flag-5'>DS</b>26324 E<b class='flag-5'>1</b>/<b class='flag-5'>T1</b>/J<b class='flag-5'>1</b>系统端口短程线路接口单元

    DS31256 启用小数 T1 (FT1) 检测

    发表于 11-17 12:42 0次下载
    <b class='flag-5'>在</b> <b class='flag-5'>DS</b>31256 <b class='flag-5'>上</b><b class='flag-5'>启用</b>小数 <b class='flag-5'>T1</b> (FT<b class='flag-5'>1</b>) <b class='flag-5'>环</b><b class='flag-5'>回</b><b class='flag-5'>检测</b>

    T1和E1之间的转换

    本应用笔记介绍如何使用达拉斯半导体DS21X52和DS21X54单芯片收发器(SCT)和DS216xx时钟适配器(CLAD)将T1转换为E1
    的头像 发表于 01-10 13:45 2086次阅读
    <b class='flag-5'>T1</b>和E<b class='flag-5'>1</b>之间的转换

    Maxim T1/E1/J1收发器的T1/E1操作

    模式对于设备或设备的诊断测试非常有用。模式下,设备信号通过网络或特定链路后,将信号从
    的头像 发表于 01-16 15:29 1524次阅读
    Maxim <b class='flag-5'>T1</b>/E<b class='flag-5'>1</b>/J<b class='flag-5'>1</b>收发器的<b class='flag-5'>T1</b>/E<b class='flag-5'>1</b><b class='flag-5'>环</b><b class='flag-5'>回</b>操作

    使用TDMoP器件的FDL网络支持

    本应用笔记解释了如何使用Maxim的TDM包(TDMoP)器件支持FDL(设施数据链路)网络。本文重点介绍TDMoP产品线,其中包括本文档中称为DS34T10x的几种器件。具体的TDMoP器件包括
    的头像 发表于 02-07 14:45 981次阅读
    使用TDMoP器件的FDL网络<b class='flag-5'>环</b><b class='flag-5'>回</b>支持

    利用TDMoP器件支持FDL网络

    许多应用中,系统管理员需要操作支持系统(OSS),控制、管理网络设备。使用OSS,管理员可以发出命令给“测试探头”,启用或关闭FDL网络。本应用笔记介绍了如何使用
    的头像 发表于 02-09 16:37 902次阅读
    利用TDMoP器件支持FDL网络<b class='flag-5'>环</b><b class='flag-5'>回</b>

    DS31256的分数T1 (FT1)检测

    这篇应用笔记介绍了利用DS31256的接收BERT功能实现分数T1 (FT1)上环或下
    的头像 发表于 06-16 15:35 1000次阅读
    <b class='flag-5'>DS</b>31256的<b class='flag-5'>分数</b>级<b class='flag-5'>T1</b> (FT<b class='flag-5'>1</b>)<b class='flag-5'>环</b><b class='flag-5'>回</b><b class='flag-5'>检测</b>