\n'; Text += '
'; Text += ' \n'; Text += '
'; Text += '\n'; for (var i=0;i<(extra_info[extra_info_index].length-1);i++) { Text += hbutton(sig_buttons[i], 'opener.location=loc[sel.selectedIndex]['+i+'];', bnum++); } Text += hbutton("Search Backwards", 'opener.search(sel.options[ sel.selectedIndex ].text,' + '0,opener.last_link,-1,0);',bnum++); Text += hbutton("Search Forwards", 'opener.search(sel.options[ sel.selectedIndex ].text,' + '0,opener.last_link, 1,0);',bnum++); Text += hbutton("Close","window.close();",bnum++); Text += '
\n'; Text += '
Hosted by www.Geocities.ws

\n'; w.document.open(); w.document.write(Text); w.document.close(); w.document.forms[0].elements[0].options[0].text = linkText; w.sel = w.document.forms[0].elements[0]; for (j=0;j<10;j++) w.loc[j] = new Array(sig_buttons.length); copy_into_loc0(w,extra_info_index); } else { if ((window.location.pathname.substring(0,window.location.pathname.lastIndexOf(dirSep)))!= (w.location.pathname.substring(0,w.location.pathname.lastIndexOf(dirSep)))) { w.close(); if (is_nav4up) return qs(e,t,extra_info_index); else return false; } var opts = w.document.forms[0].elements[0].options; if ( opts.length<10 ) { w.loc[opts.length] = new Array; opts.length++; } for (i=opts.length-2;i>=0;i--) { opts[i+1].text=opts[i].text; for (var j=0;j' + ' '+text+'\n'; } function copy_into_loc0 (w,extra_info_index) { for (var i=1;i=0;i+=inc) { linkText = is_nav4up ? document.links[i].text : document.links[i].innerText; linkY = is_nav4up ? document.links[i].y : document.links[i].offsetTop; if ((linkText == text) && (linkY != y)) { window.status=""; if (is_nav4up) if (relative) window.scrollBy(0,linkY - y); else window.scrollTo(0,linkY); else if (is_ie4up) document.links[i].scrollIntoView(true); last_link=i; last_class=document.links[i].className; document.links[i].className='HI'; return false; } } nextpage = (inc==1) ? next_page() : prev_page(); wrappage = (inc==1) ? first_page() : last_page(); if (nextpage!="" || wrappage!="") { if (nextpage=="") { if (!confirm(text + " not found. Search again from "+((inc==1)?"first":"last")+" page?")) return false; nextpage=wrappage; } location=nextpage+ "?" + escape(text) + "&" + ( y - window.pageYOffset ) + "&" + inc; return false; } if (confirm(text + " not found. Search again from "+((inc==1)?"start":"end")+"?")) { if (inc==1) i=-1; else i=document.links.length; } else return false; } return true; } function loadqs() { var opt=location.search, text="", s="", y=0, si=0, inc=1; if (opt.length==0) return true; for (var i=1;i
// IRS.V
//
// The internal registers control the operation of the Link Layer Controller. 
// The register definitions and their respective addresses are specified as follows
//
// (All addresses are in hexadecimal)
//
//10-ATAck (Address Transmitter Acknowledge Receive)
//14-Ack Valid
//16-Ack Error
//17-TEn (Transmitter Enable)
//18-REn (Receiver Enable)
//19-HdrErr (Header CRC Error)
//1A-TcErr (Transaction Code Error)
//20-RdPhy (Read Phy-chip register)
//21-WrPhy (Write Phy-chip register)
//24-PhyRgAd (Physical-chip Register Address)
//28-PhyRgData (Physical-chip Register data)
//30-PhyRxAd (Physical-chip Register receive address)
//34-PhyRxData (Physical Chip Register receive data)
//40-Bus Number
//4A-Node Number
//50-Cycle Time Register

[Up: bismillah IRS1]
module irsIndex(
		//Inputs
		BCLK, 
		reset_n, 
		wenable, //write enable-to enable memory for a write
		oenable, //output enable-to enable memory for a read
		ADDR_IR, //Input address of the register
		DATA_IR_in, //Data input to be written
		//Output
        DATA_IR_out //Data output to be read
	   );

input BCLK, wenable, oenable, reset_n;
wire BCLK, wenable, oenable, reset_n;
input [7:0] ADDR_IR;
wire [7:0] ADDR_IR;
input [15:0]DATA_IR_in;
wire [15:0]DATA_IR_in;
output [15:0]DATA_IR_out;

reg [15:0]DATA_IR_out;


reg [15:0]IR_0, IR_1, IR_2, IR_3, IR_4; //Registers serving as a storage for control info of Link Layer

always@(negedge BCLK or negedge reset_n)
begin

  if(!reset_n) //Initializing the internal registers whenever the Link Layer is reset
   begin
   IR_0<=16'h0000; 
   IR_1<=16'h0000; 
   IR_2<=16'h0000; 
   IR_3<=16'h0000;
   IR_4<=16'h0000;
   end

   else if(wenable) //Write to the Registers
   begin

   case(ADDR_IR)
   8'b 01000000: IR_0[15:0] <=DATA_IR_in[15:0];
   8'b 01001010: IR_0[5:0] <= DATA_IR_in[15:10];
   8'b 00010000: IR_1[15:12] <= DATA_IR_in[15:12];
   8'b 00010100: IR_1[11:10] <= DATA_IR_in[15:14];
   8'b 00010110: IR_1[9] <=  DATA_IR_in[15];
   8'b 00010111: IR_1[8] <=  DATA_IR_in[15];
   8'b 00011000: IR_1[7] <=  DATA_IR_in[15];
   8'b 00011001: IR_1[6] <=  DATA_IR_in[15];
   8'b 00011010: IR_1[8] <=  DATA_IR_in[15];
   8'b 00100000: IR_2[15] <= DATA_IR_in[15];
   8'b 00100001: IR_2[14] <= DATA_IR_in[15];
   8'b 00100100: IR_2[11:8] <= DATA_IR_in[15:12];
   8'b 00101000: IR_2[7:0] <= DATA_IR_in[15:8];
   8'b 00110000: IR_3[15:12] <= DATA_IR_in[15:12];
   8'b 00110100: IR_3[11:4] <= DATA_IR_in[15:8];
   8'b 01010000: IR_4 = DATA_IR_in;
   endcase
   
   end
   
   else if(oenable) //Read data from the internal registers
   case(ADDR_IR)
   8'b 01000000: DATA_IR_out[15:0] <= IR_0[15:0];
   8'b 01001010: DATA_IR_out[15:10] <= IR_0[5:0] ;
   8'b 00010000: DATA_IR_out[15:12] <= IR_1[15:12];
   8'b 00010100: DATA_IR_out[15:14] <= IR_1[11:10];
   8'b 00010110: DATA_IR_out[15] <= IR_1[9];
   8'b 00010111: DATA_IR_out[15] <= IR_1[8];
   8'b 00011000: DATA_IR_out[15] <= IR_1[7];
   8'b 00011001: DATA_IR_out[15] <= IR_1[6];
   8'b 00011010: DATA_IR_out[15] <= IR_1[5];
   8'b 00100000: DATA_IR_out[15] <= IR_2[15];
   8'b 00100001: DATA_IR_out[15] <= IR_2[14];
   8'b 00100100: DATA_IR_out[15:12] <= IR_2[11:8];
   8'b 00101000: DATA_IR_out[15:8] <= IR_2[7:0];
   8'b 00110000: DATA_IR_out[15:12] <= IR_3[15:12];
   8'b 00110100: DATA_IR_out[15:8] <= IR_3[11:4];
   8'b 01010000: DATA_IR_out <= IR_4;	
   default: DATA_IR_out<=16'h0000;
   
   endcase

end

endmodule





This page: Maintained by: [email protected]
Created:Sun Mar 11 19:18:58 2001
From: /mnt/c/windows/desktop/floppy/commen~1/irs.v

Verilog converted to html by v2html 6.0 (written by Costas Calamvokis).Help































Hosted by www.Geocities.ws

1