<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>https://www.yo3iti.ro/index.php?action=history&amp;feed=atom&amp;title=Por%C8%9Bi_logice</id>
	<title>Porți logice - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="https://www.yo3iti.ro/index.php?action=history&amp;feed=atom&amp;title=Por%C8%9Bi_logice"/>
	<link rel="alternate" type="text/html" href="https://www.yo3iti.ro/index.php?title=Por%C8%9Bi_logice&amp;action=history"/>
	<updated>2026-11-20T23:48:10Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.yo3iti.ro/index.php?title=Por%C8%9Bi_logice&amp;diff=3665&amp;oldid=prev</id>
		<title>Yo3iti la 21 februarie 2026 23:26</title>
		<link rel="alternate" type="text/html" href="https://www.yo3iti.ro/index.php?title=Por%C8%9Bi_logice&amp;diff=3665&amp;oldid=prev"/>
		<updated>2026-02-21T23:26:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 februarie 2026 01:26&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l95&quot;&gt;Linia 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 95:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Fișier:Surfer verilog.png|none|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;640px&lt;/del&gt;|porți logice - simulare în Surfer, pe mac]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Fișier:Surfer verilog.png|none|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1024px&lt;/ins&gt;|porți logice - simulare în Surfer, pe mac]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Yo3iti</name></author>
	</entry>
	<entry>
		<id>https://www.yo3iti.ro/index.php?title=Por%C8%9Bi_logice&amp;diff=3664&amp;oldid=prev</id>
		<title>Yo3iti: Pagină nouă:  &lt;syntaxhighlight lang=&quot;verilog&quot;&gt; module logic_gates (     input wire a,     input wire b,     output wire y0,     output wire y1,     output wire y2 ); assign y0 = ~a; assign y1 = ~(a&amp;b); assign y2 = ~(a|b); endmodule &lt;/syntaxhighlight&gt;  Și un testbench:  &lt;syntaxhighlight lang=&quot;verilog&quot;&gt; `timescale 1ns/1ps  module logic_gates_tb;     // Declare testbench signals     reg a, b;     wire y0, y1, y2;          // Instantiate the design under test (DUT)     logic_gates dut (...</title>
		<link rel="alternate" type="text/html" href="https://www.yo3iti.ro/index.php?title=Por%C8%9Bi_logice&amp;diff=3664&amp;oldid=prev"/>
		<updated>2026-02-21T23:26:04Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă:  &amp;lt;syntaxhighlight lang=&amp;quot;verilog&amp;quot;&amp;gt; module logic_gates (     input wire a,     input wire b,     output wire y0,     output wire y1,     output wire y2 ); assign y0 = ~a; assign y1 = ~(a&amp;amp;b); assign y2 = ~(a|b); endmodule &amp;lt;/syntaxhighlight&amp;gt;  Și un testbench:  &amp;lt;syntaxhighlight lang=&amp;quot;verilog&amp;quot;&amp;gt; `timescale 1ns/1ps  module logic_gates_tb;     // Declare testbench signals     reg a, b;     wire y0, y1, y2;          // Instantiate the design under test (DUT)     logic_gates dut (...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pagină nouă&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;verilog&amp;quot;&amp;gt;&lt;br /&gt;
module logic_gates (&lt;br /&gt;
    input wire a,&lt;br /&gt;
    input wire b,&lt;br /&gt;
    output wire y0,&lt;br /&gt;
    output wire y1,&lt;br /&gt;
    output wire y2&lt;br /&gt;
);&lt;br /&gt;
assign y0 = ~a;&lt;br /&gt;
assign y1 = ~(a&amp;amp;b);&lt;br /&gt;
assign y2 = ~(a|b);&lt;br /&gt;
endmodule&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Și un testbench:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;verilog&amp;quot;&amp;gt;&lt;br /&gt;
`timescale 1ns/1ps&lt;br /&gt;
&lt;br /&gt;
module logic_gates_tb;&lt;br /&gt;
    // Declare testbench signals&lt;br /&gt;
    reg a, b;&lt;br /&gt;
    wire y0, y1, y2;&lt;br /&gt;
    &lt;br /&gt;
    // Instantiate the design under test (DUT)&lt;br /&gt;
    logic_gates dut (&lt;br /&gt;
        .a(a),&lt;br /&gt;
        .b(b),&lt;br /&gt;
        .y0(y0),&lt;br /&gt;
        .y1(y1),&lt;br /&gt;
        .y2(y2)&lt;br /&gt;
    );&lt;br /&gt;
    &lt;br /&gt;
    // Test stimulus&lt;br /&gt;
    initial begin&lt;br /&gt;
        // Create VCD file for waveform viewing&lt;br /&gt;
        $dumpfile(&amp;quot;logic_gates.vcd&amp;quot;);&lt;br /&gt;
        $dumpvars(0, logic_gates_tb);&lt;br /&gt;
        &lt;br /&gt;
        // Display header&lt;br /&gt;
        $display(&amp;quot;Time\t a b | y0(NOT) y1(NAND) y2(NOR)&amp;quot;);&lt;br /&gt;
        $display(&amp;quot;----------------------------------------&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        // Test all input combinations&lt;br /&gt;
        a = 0; b = 0; #10;&lt;br /&gt;
        $display(&amp;quot;%0t\t %b %b |   %b       %b        %b&amp;quot;, $time, a, b, y0, y1, y2);&lt;br /&gt;
        &lt;br /&gt;
        a = 0; b = 1; #10;&lt;br /&gt;
        $display(&amp;quot;%0t\t %b %b |   %b       %b        %b&amp;quot;, $time, a, b, y0, y1, y2);&lt;br /&gt;
        &lt;br /&gt;
        a = 1; b = 0; #10;&lt;br /&gt;
        $display(&amp;quot;%0t\t %b %b |   %b       %b        %b&amp;quot;, $time, a, b, y0, y1, y2);&lt;br /&gt;
        &lt;br /&gt;
        a = 1; b = 1; #10;&lt;br /&gt;
        $display(&amp;quot;%0t\t %b %b |   %b       %b        %b&amp;quot;, $time, a, b, y0, y1, y2);&lt;br /&gt;
        &lt;br /&gt;
        // End simulation&lt;br /&gt;
        #10;&lt;br /&gt;
        $display(&amp;quot;\nSimulation completed successfully!&amp;quot;);&lt;br /&gt;
        $finish;&lt;br /&gt;
    end&lt;br /&gt;
endmodule&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se compilează cu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Compile&lt;br /&gt;
iverilog -o sim logic_gates.v logic_gates_tb.v&lt;br /&gt;
&lt;br /&gt;
# Run simulation&lt;br /&gt;
vvp sim&lt;br /&gt;
&lt;br /&gt;
# Open waveform&lt;br /&gt;
surfer logic_gates.vcd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rezultate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
(venv) tom@MacBook-Pro-Miron logic_gates % vvp sim&lt;br /&gt;
VCD info: dumpfile logic_gates.vcd opened for output.&lt;br /&gt;
Time     a b | y0(NOT) y1(NAND) y2(NOR)&lt;br /&gt;
----------------------------------------&lt;br /&gt;
10000    0 0 |   1       1        1&lt;br /&gt;
20000    0 1 |   1       1        0&lt;br /&gt;
30000    1 0 |   0       1        0&lt;br /&gt;
40000    1 1 |   0       0        0&lt;br /&gt;
&lt;br /&gt;
Simulation completed successfully!&lt;br /&gt;
logic_gates_tb.v:43: $finish called at 50000 (1ps)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Fișier:Surfer verilog.png|none|640px|porți logice - simulare în Surfer, pe mac]]&lt;/div&gt;</summary>
		<author><name>Yo3iti</name></author>
	</entry>
</feed>