6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 9:59 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Dec 27, 2023 12:15 pm 
Offline

Joined: Tue Dec 26, 2023 10:40 am
Posts: 2
hi, sorry, tried learning about MOSFETs and connecting the understanding to visual6502’s simulation…

i cant figure out what’s pull-up pulldown in the behavior for the nodes.. i understand from another post that the pull-up is for representing depletion transistors. then, specifically, there’s a javascript function setHigh() will change the pullup to true, my question is, how does that connect to MOSFET’s behaviors? does it mean that the node becomes a depletion transistor?

thanks!

edit : so far i think i figured what’s going on, a node may be a depletion transistor but the pullup flag = true doesn’t mean the node becomes a depletion transistor because the node could be, for instance, a pin, then the pull up flag is to set the state of that note to 1


Last edited by pulsecch on Wed Dec 27, 2023 2:04 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 27, 2023 2:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Welcome! I'll see if I can explain the way I understand it. Visual6502 is a switch-level simulation, so it models all the FETs (MOSFETs) as switches, either on or off. Except, as you note, it has special handing for the pullups.

In the 6502 the pullups are depletion mode, which means they are always on, but they are more weakly on when they are pulling up a very low voltage. This makes them more efficient than a pullup resistor: when the output of a logic gate is supposed to be low, they don't waste quite so much power. But for the purposes of visual6502, that's a detail which isn't part of the simulation.

So, most of the 6502 is made of logic gates, and in NMOS technology logic gates are built with pulldown networks where the logic happens, and a single pullup. If the logic network pulls down, one way or another, then the output is low. If the logic network doesn't pull down, then the pullup takes over and brings the output to a high level. The logic network can be modelled as a number of switches, which either conduct or don't - they are either closed or open - and the visual6502 simulator just has to figure out if there's a path to ground, or not.

Every node gets evaluated, potentially many times in each clock phase. If there's a path to ground, then the node is set to low. If there's no path to ground, the simulator needs to know if there's a pullup or not. If there is a pullup on this node, then the node is set to high. If there isn't, the node keeps its previous value.

It's important that a node can keep the previous value, as that's one of the ways that bits are stored on-chip.

In other words, visual6502 models pullups, and it doesn't really model them as one sort or another sort of transistor - it would be just the same code if the pullups were resistors.

(There's another evaluation visual6502 has to do, when a transistor turns on and connects two nodes, in the case that neither of them is pulled down or pulled up.)


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 27, 2023 2:17 pm 
Offline

Joined: Tue Dec 26, 2023 10:40 am
Posts: 2
thanks so much BigEd! lemme slowly digest that..


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: