NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

`include "discipline.h"
`include "constants.h"

// $Date: 1997/08/28 05:54:36 $
// $Revision: 1.1 $
//
//



//--------------------
// dac_8bit_ideal
//
// - 8 bit digital analog converter
//
// vd0..vd7: data inputs [V,A]
// vout: [V,A]
//
// INSTANCE parameters
// vref = reference voltage that conversion is with respect to [V]
// vtrans = transition voltage between logic high and low [V]
// tdel,trise,tfall = {usual} [s]
//
// MODEL parameters
// {none}

module dac_8bit_ideal (vd7, vd6, vd5, vd4, vd3, vd2, vd1, vd0, vout);
electrical vd7, vd6, vd5, vd4, vd3, vd2, vd1, vd0, vout;
parameter real vref = 1 from [0:inf);
parameter real trise = 0 from [0:inf);
parameter real tfall = 0 from [0:inf);
parameter real tdel = 0 from [0:inf);
parameter real vtrans = 2.5;

real out_scaled; // output scaled as fraction of 256

analog begin
out_scaled = 0;
out_scaled = out_scaled + ((V(vd7) > vtrans) ? 128 : 0);
out_scaled = out_scaled + ((V(vd6) > vtrans) ? 64 : 0);
out_scaled = out_scaled + ((V(vd5) > vtrans) ? 32 : 0);
out_scaled = out_scaled + ((V(vd4) > vtrans) ? 16 : 0);
out_scaled = out_scaled + ((V(vd3) > vtrans) ? 8 : 0);
out_scaled = out_scaled + ((V(vd2) > vtrans) ? 4 : 0);
out_scaled = out_scaled + ((V(vd1) > vtrans) ? 2 : 0);
out_scaled = out_scaled + ((V(vd0) > vtrans) ? 1 : 0);
V(vout) <+ transition( vref*out_scaled/256, tdel, trise, tfall );
end
endmodule




     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.