Effacer les filtres
Effacer les filtres

Using Bitfields in Bus Editor

8 vues (au cours des 30 derniers jours)
Zakeer Shaik
Zakeer Shaik le 7 Août 2019
Modifié(e) : Sam Warner le 23 Jan 2022
How can i use bit fields in bus structure?

Réponses (1)

Sam Warner
Sam Warner le 23 Jan 2022
Modifié(e) : Sam Warner le 23 Jan 2022
Seems the way to do this is define bus, with BusElements data type set to Boolean. By ordering the BusElements then one can even insure that the bit represents the correct bit in the word (Move Element Up/Down withiin the Bus Editor).
Though, this technique is limited to word sizes supported by Matlab. Other word (1bit > sizes < 8bits) have a bit of hole with this technique. Though, what I have done is used enumerations for these types of word sizes, and prescribed the values that conform to the size. Does leave a bit of a hole for this technique when the bitfield is outside of a natural word size that Matlab supports.

Catégories

En savoir plus sur Create Large-Scale Model Components dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by