// This is a component for EMC2 HAL // // This program is free software; you can redistribute it and/or // modify it under the terms of version 2 of the GNU General // Public License as published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA component conv_u32_bits "Converts an unsinged 32 bit word into separate bits"; pin in u32 u32in "Input value" ; pin out bit bit00 "Outpit for bit00"; pin out bit bit01 "Outpit for bit01"; pin out bit bit02 "Outpit for bit02"; pin out bit bit03 "Outpit for bit03"; pin out bit bit04 "Outpit for bit04"; pin out bit bit05 "Outpit for bit05"; pin out bit bit06 "Outpit for bit06"; pin out bit bit07 "Outpit for bit07"; pin out bit bit08 "Outpit for bit08"; pin out bit bit09 "Outpit for bit09"; pin out bit bit10 "Outpit for bit10"; pin out bit bit11 "Outpit for bit11"; pin out bit bit12 "Outpit for bit12"; pin out bit bit13 "Outpit for bit13"; pin out bit bit14 "Outpit for bit14"; pin out bit bit15 "Outpit for bit15"; pin out bit bit16 "Outpit for bit16"; pin out bit bit17 "Outpit for bit17"; pin out bit bit18 "Outpit for bit18"; pin out bit bit19 "Outpit for bit19"; pin out bit bit20 "Outpit for bit20"; pin out bit bit21 "Outpit for bit21"; pin out bit bit22 "Outpit for bit22"; pin out bit bit23 "Outpit for bit23"; pin out bit bit24 "Outpit for bit24"; pin out bit bit25 "Outpit for bit25"; pin out bit bit26 "Outpit for bit26"; pin out bit bit27 "Outpit for bit27"; pin out bit bit28 "Outpit for bit28"; pin out bit bit29 "Outpit for bit29"; pin out bit bit30 "Outpit for bit30"; pin out bit bit31 "Outpit for bit31"; function _; license "GPL"; ;; FUNCTION(_) { bit00 = u32in & (1 << 0); bit01 = u32in & (1 << 1); bit02 = u32in & (1 << 2); bit03 = u32in & (1 << 3); bit04 = u32in & (1 << 4); bit05 = u32in & (1 << 5); bit06 = u32in & (1 << 6); bit07 = u32in & (1 << 7); bit08 = u32in & (1 << 8); bit09 = u32in & (1 << 9); bit10 = u32in & (1 << 10); bit11 = u32in & (1 << 11); bit12 = u32in & (1 << 12); bit13 = u32in & (1 << 13); bit14 = u32in & (1 << 14); bit15 = u32in & (1 << 15); bit16 = u32in & (1 << 16); bit17 = u32in & (1 << 17); bit18 = u32in & (1 << 18); bit19 = u32in & (1 << 19); bit20 = u32in & (1 << 20); bit21 = u32in & (1 << 21); bit22 = u32in & (1 << 22); bit23 = u32in & (1 << 23); bit24 = u32in & (1 << 24); bit25 = u32in & (1 << 25); bit26 = u32in & (1 << 26); bit27 = u32in & (1 << 27); bit28 = u32in & (1 << 28); bit29 = u32in & (1 << 29); bit30 = u32in & (1 << 30); bit31 = u32in & (1 << 31); }