How to prevent Quartus RTL Viewer from optimizing my Verilog code?

module temp (

input [1:0] A,
output [1:0] O

);

wire w0, w1;

nand (w0, A[0], A[1]);
nor (w1, A[0], A[1]);
not (O[0], w0);
not (O[1], w1);

endmodule


When I do an Analysis&Synthesis to above code, and then go for Tools->Netlist Viewers->RTL Viewer ;

I see the below one,

Now, the thing is, I have to implement a circuit with using NAND, NOR and NOT gates only, and there, I have an OR statement. So, I though I can do an OR out of NOR+NOT. But, as you see, the RTL viewer optimizes(?) my code and replaces NOR+NOT with an OR. Is there a way to prevent it doing so?

Thanks.

edit:

• 'Hmmm' no more, friend. You're not in a large design and your assignment is about learning digital logic design. HDLs abstract you from the real circuit. You can churn out unreliable rubbish circuits that superficially appear to work. Understand digital logic design, don't just become a VHDL/Verilog writer. It's probably faster and easier on paper for a tiny circuit like this than in schematic capture, which I wouldn't use. They're trying to get you to understand the building blocks fluently. It's your choice but the goal isn't to find your personally comfortable path. Commented Apr 20, 2020 at 7:10
• When I first learnt digital logic, I did all designs and mental simulations in sketches then schematic because there was no cheap HDL availability. When I moved to VHDL, I wanted to understand what logic circuits my VHDL would produce. The logic circuit is what we plug in and use, not the HDL. As I understood more and more of the logic produced by HDL, I could more directly in HDL - because I was well up that learning curve. You're right at the start and need to learn that. When designing a new circuit, as with my current FPGA, I picture or sketch out the important blocks before starting. Commented Jun 1, 2020 at 10:39
• Getting the requirements and possible logic circuit right are the hard bit. Writing the VHDL is relatively easy. If you've got the first two right, you hit no problems in the HDL. You've worked out how to relieve tight timing, how to get the gate count down to what's required. The best logic circuit is the simplest: in nearly all cases it's the easiest to maintain, has fewest failure modes and is quickest to understand. (Comment HDL well, explaining 'why' something is, not what it is - your designs need to be easily maintainable by others, not by oneself from memory.) Commented Jun 1, 2020 at 10:48
• @TonyM thanks for sharing your experience and thoughts. Commented Jun 1, 2020 at 10:51
• Pleasure. Like all advice, take what's useful to you and ditch what isn't. Good luck and enjoy learning :-) Commented Jun 1, 2020 at 12:57

• ok, sorry for the word cable. It became a little bit unrelated with the original question, however, I added the picture. Now, all the gates at left are nand gates, I did not define them as nand keyword in verilog, however, they are the results of some ~& reduction operator. RTL viewer understands that they are nand gates, because it calls them WideNandx but, I don't understand why it moves those inversion bubbles apart from the gates. Commented Apr 20, 2020 at 10:09