title: verilog fwrite output bytes
body: <p>I know that if I am outputting a binary file in verilog, then I can use the following verilog IO standard function:</p>
  
  <pre><code>$fwrite(fd,"%u",32'hABCDE124); 
  </code></pre>
  
  <p>But the above command writes 4-byte data into the file. What if the binary data that I want to write is only one-byte, two-bytes or three-bytes? 
  How can I do this?</p>
  
  <p>For example, I know the following won't do what I want:</p>
  
  <pre><code>$fwrite(fd,"%u",8'h24);
  $fwrite(fd,"%u",16'hE124);
  $fwrite(fd,"%u",24'hCDE124);
  </code></pre>
  
  <p>Is there any way that I can write a non 4-byte multiple data into a file?</p>
  
  <p>Thanks, </p>
  
  <p>--Rudy </p>