Home
  • Home
  • Features
    • UML Object Diagrams
    • UML Statechart Diagrams
    • HDL Code Generation
  • Demos
    • Screencasts
    • Source Code
  • Support
    • Documentation
    • Screencasts
    • Customer Support
  • Try
  • Buy
  • Company
    • About
    • Services
    • Contact
  • QuickStart
  • Diagrams
    • Diagram UML View
    • Diagram HDL View
    • UML State Diagram
  • Dialogs
    • Add Input Pad Dialog
    • Add Output Pad Dialog
    • Add InOut Pad Dialog
    • Add State Input Dialog
    • Add State Output Dialog
    • Add Constant Dialog
    • Add Alias Dialog
    • Edit Comments Dialog
    • Expression Editor
  • Palettes
    • UML State Palette
    • UML Classes Palette
    • UML Documents Palette
    • HDL Palette
  • Properties Editors
    • Document Properties Editor
    • UML Object Properties Editor
  • Panels
    • Generation Console Tab
    • Navigator
    • Overview
  • UML Classes
    • BarrelShifter
    • Comparator
    • Counter
    • Decoder
    • Encoder
    • Johnson Counter
    • Latch
    • LFSR
    • Multiplexer
    • Parity
    • Register
    • Shift Register
Home | Documentation | UML Classes

Encoder

 Encoder

Also called: Priority Encoder.

Function

Selects the most significant one bit on the input and encodes this as a binary number on the output.

Notation

"BIN_OF_MSB" = binary value of input's most significant bit that has a value of one.

Comments

All zeros on the input of the encoder is an ambiguous condition since the output is the same as the input with a single bit in the least significant position.  The "Valid" output can be used to flag this condition.

Parameters

Name

Description

WIDTH

Width of the Y and Q ports.

Tagged Values

Name

Variants

Registered

No, Yes

Valid

UnUsed, Used

Enable

UnUsed, Used

Inputs

Name

Width

Condition

Description

D

2**WIDTH

None

Input bits to be encoded.

Enable

 

Registered = No

if (Enable) Y = BIN_OF_MSB; else Y=0;

ClockEn

 

Registered = Yes

if (ClockEn) Q = BIN_OF_MSB

 Outputs

Name

Width

Condition

Description

Y

WIDTH

Registered = No

BIN_OF_MSB

Q

WIDTH

Registered = Yes

BIN_OF_MSB

Valid

 

Valid = Used

if (D == 0) Valid = 0; else Valid = 1;

 

‹ Decoder up Johnson Counter ›

© Copyright 2009 Techniprise Inc. All rights reserved.