Skip to content

Synthetic frontend#17

Open
sweet12prof wants to merge 1 commit intolitz-lab:mainfrom
sweet12prof:synthetic_frontend
Open

Synthetic frontend#17
sweet12prof wants to merge 1 commit intolitz-lab:mainfrom
sweet12prof:synthetic_frontend

Conversation

@sweet12prof
Copy link

Synthetic frontend

Defines

  • Logic and Plugins for frontend
  • APIs that generate microkernels that can be issued at the frontend

Files

Find files in src/frontend/synthetic

  • distributions : templated sequences that can be orchestrated to be according to a particular pattern (eg: strided mem addresses, random branch dir pattern etc)
  • synthetic_kernels : contains low-level apis that generate very basic one line ctype_insts and higher-level apis that make use of those lower-levels and distributions to create complex micorkernels.
  • bottleneck_table: some complex microkernels already created can be seen here
  • synth_fe : frontend plugins
  • Usage
  • .... --frontend synthetic --bottleneck [ table_entry_from_bottleneck_table ]

Bottleneck Requirements

Some bottlenecks have some rquirements

  • icache Limited : fdip must be off
  • CBR/BR workloads: To truly make the kernels bound to control flow . we must ensure full ft issue every cycle. So every ft group for CF workloads has (ISSUE_WIDTH-1) leading NOPs followed by a branch. Also the issue packet sums up to icache_line_size for simplicity.
  • For CBR/BR workloads ensure the uop cache is large enough to minimise frontend latency and limit workload to bad spec

@sweet12prof sweet12prof marked this pull request as ready for review December 23, 2025 17:30
Copy link
Contributor

@hlitz hlitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some first comments. I think you can actually squash the commits otherwise you have to rebase continuously. I will review the whole thing at once.

@hlitz
Copy link
Contributor

hlitz commented Jan 23, 2026 via email

@hlitz hlitz self-requested a review February 9, 2026 23:57
case NORMAL_ROUND_ROBIN: {
if (next_element_index >= size)
next_element_index = 0;
return sequence_vector[next_element_index++];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROUND_ROBIN and RANDOM should pick from the same datastructure/object. I agree that "distribution" is not longer the right term when we pick from it in round robin order. So can we rename "distribution" to "sampler" or "generator" and then make it generic so that it can support all different pick strategies?

get_next_element() should just do: return sampler->next_element()

The API should like this:
struct type {
UNIFORM_SEQUENTIAL, //value_range numbers, starting at start_value, incrementing by 1
UNIFORM_RANDOM, //like UNFORM_SEQUENTIAL but shuffled
NORMAL_RANDOM, //computes as in Formula 1
USER_DEFINED //receives an optional argument, a vector of distinct values
}

Formula 1.
C(x) = Round( H * e^(-0.5 * ((x - mu) / sigma)^2)

Where C(x) is the x'th value of the value_range,
H = e^4.5 = 90
sigma = R/6
mu = R/2
and R = value_range

for a value_range of 1000 distinct values (e.g. 1-1000) this should yield a normal distributed sampler containing about 30000 values

sampler(type, start_value, value_range ) to define the values that will be generated by the sampler at construction time. So you want to prefill the sampler at construction time and then just draw from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants