Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:44:08+00:00 2026-06-18T11:44:08+00:00

I had written a Verilog code given below for simulation purpose.It is working properly

  • 0

I had written a Verilog code given below for simulation purpose.It is working properly during simulation.

 module read_1(clk,reset);
 input clk,reset;
 reg [0:23]dataout;
 reg htpv;
 reg [0:23]e_data;
 reg[1:24]data_out;
 reg [25:0]cpv,cpv_round,e_av;
 reg [0:23]data[0:0]; 
 parameter threshold =8388608;
 integer i,f1;
 always @(negedge reset) 
  begin
   i=0;
   $readmemb("ppm_data.txt",data); 
   dataout=data[0];
   e_data=24'b0;
  end
always @(negedge clk)
  begin
   f1=$fopen("xxxx.txt","a");
   if(i==0)
   begin
   data_out=dataout[(i*24)+:24];
   e_av=(e_data[0:23])>>4;
   e_data=e_data<<24;
   cpv=data_out+e_av;
   cpv_round=(cpv<threshold)?0:16777215;
   htpv=(cpv_round==0)?1:0;
   e_data[0:23]=cpv-cpv_round;
   $fwrite(f1,"%b",htpv);
   i=i+1;
end
 $fclose(f1);
 end
endmodule

Now I am synthesizing above code using Lattice Diamond, I am getting errors at ‘Map Design’ step. Errors are given below:-

ERROR - map: Design is empty.
ERROR - map: Errors found in users design.  Output files not written.

Why I am getting these errors and how I can resolve them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:44:09+00:00Added an answer on June 18, 2026 at 11:44 am

    The synthesiser is clever, it removes any logic which cannot influence an output.

    You have no outputs, only regs – so all your logic gets optimised away and the design is seen as empty.

    Note that $fopen and $fwrite are not synthesisable, so don’t count as “outputs”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had written the code given below: Its output datatype is integers, I want
I had written program which copy data into txt file program is given below
I had written a jquery code to hide some labels, textbox contained in tables
I was glancing through some code I had written in my Perl class and
I used FxCop to analyze some code I had written. I had exposed a
I recently updated R, and code I had written using the limma package before
I had written C++ code for a problem. After that i have tried to
I was working with a select box today that a previous employee had written.
i had written a code in t-sql that will create a table in sql
Today I was working on an old diagnostic library I had written back in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.