<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vector | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/vector/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 09 Jun 2012 09:57:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Verilog HDL Program for Counting Number of 1’s in a Vector</title>
		<link>https://studentprojects.in/electronics/verilog-hdl/verilog-hdl-program-for-counting-number-of-1s-in-a-vector/</link>
					<comments>https://studentprojects.in/electronics/verilog-hdl/verilog-hdl-program-for-counting-number-of-1s-in-a-vector/#respond</comments>
		
		<dc:creator><![CDATA[Ansten Lobo]]></dc:creator>
		<pubDate>Sat, 09 Jun 2012 09:57:24 +0000</pubDate>
				<category><![CDATA[Verilog HDL]]></category>
		<category><![CDATA[vector]]></category>
		<category><![CDATA[vlsi programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3262</guid>

					<description><![CDATA[<p>Verilog HDL Program for Counting Number of 1’s in a Vector. module count1(o1,o0,i); // 4-bit vector output [2:0]o1,o0; // o1: Number of 1’s in vector, o0: Number of 0’s in vector input [3:0]i; wire [2:0]o; wire [3:1]c; ha u1(o[0],c0,i[0],i[1]); ha u2(o[1],c1,o[0],i[2]); ha u3(o[2],c2,o[1],i[3]); ha u4(c[1],c3,c1,c0); ha u5(c[2],c[3],c[1],c2); assign o1={c[3],c[2],o[2]}; pasub31 u6(o0,3'b100,o1); endmodule module pasub31(d,a,b);//a-b output</p>
<p>The post <a href="https://studentprojects.in/electronics/verilog-hdl/verilog-hdl-program-for-counting-number-of-1s-in-a-vector/">Verilog HDL Program for Counting Number of 1’s in a Vector</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Verilog HDL Program for Counting Number of 1’s in a Vector.</p>
<pre lang="Verilog" line="1">
module count1(o1,o0,i); // 4-bit vector
    output [2:0]o1,o0; // o1: Number of 1’s in vector, o0: Number of 0’s in vector
    input [3:0]i;    wire [2:0]o;    wire [3:1]c;
    ha u1(o[0],c0,i[0],i[1]);
    ha u2(o[1],c1,o[0],i[2]);
    ha u3(o[2],c2,o[1],i[3]);
    ha u4(c[1],c3,c1,c0);
    ha u5(c[2],c[3],c[1],c2);
    assign o1={c[3],c[2],o[2]};
    pasub31 u6(o0,3'b100,o1);
endmodule

module pasub31(d,a,b);//a-b
    output [2:0]d;     input [2:0]a;     input [2:0]b;
    hs u1(d[0],c1,a[0],b[0]);
    fs u2(d[1],c2,a[1],b[1],c1);
    fs u3(d[2],c,a[2],b[2],c2);
endmodule
</pre>
<figure id="attachment_3263" aria-describedby="caption-attachment-3263" style="width: 615px" class="wp-caption aligncenter"><img decoding="async" src="https://studentprojects.in/wp-content/uploads/2012/06/Simulated-waveform-for-Counting-Number-of-1’s-in-a-Vector.jpg" alt="Simulated waveform for Counting Number of 1’s in a Vector" title="Simulated waveform for Counting Number of 1’s in a Vector" width="615" height="49" class="size-full wp-image-3263" /><figcaption id="caption-attachment-3263" class="wp-caption-text">Simulated waveform for Counting Number of 1’s in a Vector</figcaption></figure><p>The post <a href="https://studentprojects.in/electronics/verilog-hdl/verilog-hdl-program-for-counting-number-of-1s-in-a-vector/">Verilog HDL Program for Counting Number of 1’s in a Vector</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/verilog-hdl/verilog-hdl-program-for-counting-number-of-1s-in-a-vector/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
